Package org.jboss.as.test.integration.ejb.ejb2.reference.global

Examples of org.jboss.as.test.integration.ejb.ejb2.reference.global.Session21Home.create()


   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);
      }
View Full Code Here


   public String globalAccess21()
   {
      try {
         InitialContext jndiContext = new InitialContext();
         Session21Home home = (Session21Home)jndiContext.lookup("java:module/Session21!" + Session21Home.class.getName());
         Session21 session = (Session21)home.create();
         return session.access();
      } catch (Exception e)
      {
         throw new RuntimeException(e);
      }
View Full Code Here

    @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);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.