use of org.jboss.as.test.integration.ejb.ejb2.reference.global.Session21 in project wildfly by wildfly.
the class ReferenceAnnotationDescriptorTestCase method testSession21.
@Test
public void testSession21() throws Exception {
InitialContext jndiContext = new InitialContext();
Session21Home home = (Session21Home) jndiContext.lookup("java:module/Session21!" + Session21Home.class.getName());
Session21 session = home.create();
String access = session.access();
Assert.assertEquals("Session21", access);
access = session.access30();
Assert.assertEquals("Session30", access);
}
use of org.jboss.as.test.integration.ejb.ejb2.reference.global.Session21 in project wildfly by wildfly.
the class Session30Bean method access21.
public String access21() {
try {
InitialContext jndiContext = new InitialContext();
Session21Home sessionHome = (Session21Home) jndiContext.lookup("java:comp/env/injected");
Session21 session = sessionHome.create();
return session.access();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
use of org.jboss.as.test.integration.ejb.ejb2.reference.global.Session21 in project wildfly by wildfly.
the class Session30Bean method globalAccess21.
public String globalAccess21() {
try {
InitialContext jndiContext = new InitialContext();
Session21Home home = (Session21Home) jndiContext.lookup("java:module/Session21!" + Session21Home.class.getName());
Session21 session = home.create();
return session.access();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
use of org.jboss.as.test.integration.ejb.ejb2.reference.global.Session21 in project wildfly by wildfly.
the class ReferenceAnnotationDescriptorTestCase method testSession30.
@Test
public void testSession30() throws Exception {
InitialContext jndiContext = new InitialContext();
Session30Home sessionHome = (Session30Home) jndiContext.lookup("java:module/Session30!" + Session30Home.class.getName());
Session30 session = sessionHome.create();
String access = session.access();
Assert.assertEquals("Session30", access);
access = session.access21();
Assert.assertEquals("Session21", access);
}
Aggregations