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

Examples of org.jboss.as.test.integration.ejb.ejb2.reference.global.GlobalSession30Bean


   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

  
   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

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

        String access = session.access();
        Assert.assertEquals("Session30", access);

        Session30Home home = (Session30Home) jndiContext.lookup("java:module/Session30!" + Session30Home.class.getName());
        Assert.assertNotNull(home);
        Session30 sessionRemote = (Session30) home.create();
        Assert.assertNotNull(sessionRemote);
        access = sessionRemote.access();
        Assert.assertEquals("Session30", access);
    }
View Full Code Here

        Assert.assertNotNull(ejbHome);
        metadata = ejbHome.getEJBMetaData();
        Assert.assertNotNull(metadata);
        Assert.assertEquals(Session30.class.getName(), metadata.getRemoteInterfaceClass().getName());

        Session30 session = (Session30) home.create();
        Assert.assertNotNull(session);
        ejbHome = session.getEJBHome();
        Assert.assertNotNull(ejbHome);

        Handle handle = session.getHandle();
        Assert.assertNotNull(handle);

        EJBObject ejbObject = handle.getEJBObject();
        Assert.assertNotNull(ejbObject);

        ejbHome = ejbObject.getEJBHome();
        Assert.assertNotNull(ejbHome);

        Handle handle1 = ejbObject.getHandle();
        Assert.assertNotNull(handle1);

        Session30 session1 = (Session30) home.create();
        Assert.assertTrue(session.isIdentical(session1));
    }
View Full Code Here

    @Test
    public void testSessionHome30() throws Exception {
        InitialContext jndiContext = new InitialContext();

        Session30RemoteBusiness session = (Session30RemoteBusiness) jndiContext.lookup("java:module/Session30!" + Session30RemoteBusiness.class.getName());
        Assert.assertNotNull(session);
        String access = session.access();
        Assert.assertEquals("Session30", access);

        Session30Home home = (Session30Home) jndiContext.lookup("java:module/Session30!" + Session30Home.class.getName());
        Assert.assertNotNull(home);
        Session30 sessionRemote = (Session30) home.create();
View Full Code Here

TOP

Related Classes of org.jboss.as.test.integration.ejb.ejb2.reference.global.GlobalSession30Bean

Copyright © 2018 www.massapicom. 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.