Created
February 5, 2015 23:18
-
-
Save koduki/e062b91a9aea99abca4b to your computer and use it in GitHub Desktop.
Stateless session bean Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package cn.orz.pascal.javaee.simpletester.resources; | |
import javax.ejb.EJB; | |
import javax.ejb.Stateless; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
/** | |
* | |
* @author koduki | |
*/ | |
@Path("/ejbtest") | |
@Stateless | |
public class EJBExample { | |
@EJB | |
private SimpleBean simpleBean1; | |
@EJB | |
private SimpleBean simpleBean2; | |
@GET | |
public String get() { | |
String msg = ""; | |
if (simpleBean1.equals(simpleBean1)) {// this test returns true | |
msg += "s1 == s1 is true \n"; | |
} | |
if (simpleBean1.equals(simpleBean2)) {// this test returns true | |
msg += "s1 == s1 is true \n"; | |
} | |
return msg; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment