Package org.jboss.test.cts.interfaces

Examples of org.jboss.test.cts.interfaces.StatelessSessionHome.create()


      super.setUp();
      InitialContext ctx = new InitialContext();
      Object ref = ctx.lookup("ejbcts/StatelessSessionHome");
      StatelessSessionHome home = (StatelessSessionHome)
            PortableRemoteObject.narrow(ref, StatelessSessionHome.class);
      sessionBean = home.create();
   }

   protected void tearDown() throws Exception
   {
      if (sessionBean != null)
View Full Code Here


    */
   public void testEjbs() throws Exception
   {
      Context enc = getENC();     
      StatelessSessionHome home = (StatelessSessionHome) enc.lookup("ejb/StatelessSessionBean");
      StatelessSession session = home.create();
      session.method1("testEjbs");
      session.remove();
   }

   /** Build the InitialContext factory
View Full Code Here

   static void testEjbs() throws Exception
   {
      log.info("+++ testEjbs");
      Context enc = getENC();     
      StatelessSessionHome home = (StatelessSessionHome) enc.lookup("ejb/StatelessSessionBean");
      StatelessSession session = home.create();
      session.method1("testEjbs");
      session.remove();
   }

   static Context getENC()
View Full Code Here

      try
      {
         InitialContext ctx = new InitialContext();
         enc = (Context) ctx.lookup("java:comp/env");
         StatelessSessionHome home = (StatelessSessionHome) enc.lookup("ejb/StatelessSessionHome");
         StatelessSession bean = home.create();
         sessionHandle = bean.getHandle();
      }
      catch(Exception e)
      {
         log.error("StatelessSessionHome create failed", e);
View Full Code Here

      try
      {
         InitialContext ctx = new InitialContext();
         enc = (Context) ctx.lookup("java:comp/env");
         StatelessSessionHome home = (StatelessSessionHome) enc.lookup("ejb/StatelessSessionHome");
         StatelessSession bean = home.create();
         sessionHandle = bean.getHandle();
      }
      catch(Exception e)
      {
         log.error("StatelessSessionHome create failed", e);
View Full Code Here

         InitialContext ctx = new InitialContext();
         StatelessSessionHome home = (StatelessSessionHome) ctx.lookup("ejbcts/StatelessSessionBean");
         StatelessSession sessionBean;
         try
         {
            sessionBean = home.create();
         }
         catch (CreateException ex)
         {
            log.debug("Loopback CreateException: " + ex);
            throw new EJBException(ex);
View Full Code Here

   {
      super.setUp();
      InitialContext ctx = new InitialContext();
      StatelessSessionHome home =
         ( StatelessSessionHome ) ctx.lookup("ejbcts/StatelessSessionHome");
      sessionBean = home.create();
   }
   protected void tearDown() throws Exception
   {
      if( sessionBean != null )
         sessionBean.remove();
View Full Code Here

      {
         InitialContext ctx = new InitialContext(env);
         Object ref = ctx.lookup("ejbcts/StatelessSessionHome");
         StatelessSessionHome home = (StatelessSessionHome)
               PortableRemoteObject.narrow(ref, StatelessSessionHome.class);
         sessionBean = home.create();
         StatelessSessionHome home2 = (StatelessSessionHome) sessionBean.getEJBHome();
         StatelessSession bean2 = home2.create();
         bean2.remove();
      }
      finally
View Full Code Here

         Object ref = ctx.lookup("ejbcts/StatelessSessionHome");
         StatelessSessionHome home = (StatelessSessionHome)
               PortableRemoteObject.narrow(ref, StatelessSessionHome.class);
         sessionBean = home.create();
         StatelessSessionHome home2 = (StatelessSessionHome) sessionBean.getEJBHome();
         StatelessSession bean2 = home2.create();
         bean2.remove();
      }
      finally
      {
         System.setProperties(sysProps);
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.