Examples of create()


Examples of org.jboss.test.classloader.scoping.override.ejb.log4j113.StatelessSessionHome.create()

      try
      {
         deploy("log4j113-ejb.jar");
         InitialContext ctx = new InitialContext();
         StatelessSessionHome home = (StatelessSessionHome) ctx.lookup("Log4j113StatelessBean");
         StatelessSession bean = home.create();
         Throwable error = bean.checkVersion();
         getLog().debug("StatelessSession.checkVersion returned:", error);
         assertTrue("checkVersion returned null", error == null);
      }
      catch(Exception e)

Examples of org.jboss.test.classloader.scoping.transaction.interfaces.TestSessionHome.create()

   public void testScopedTransaction() throws Exception
   {
      getLog().debug("+++ testScopedTransaction start");

      TestSessionHome home = (TestSessionHome) getInitialContext().lookup("ScopedTxTestSession");
      TestSession session = home.create();
      session.runTest();

      getLog().debug("+++ testScopedTransaction end");
   }

Examples of org.jboss.test.cluster.cache.bean.CacheObjectMeanTesterHome.create()

      props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      props.put(Context.PROVIDER_URL, "localhost:1099");
      Context ctx = new InitialContext(props);
      CacheObjectMeanTesterHome home = (CacheObjectMeanTesterHome)ctx.lookup(
              CacheObjectMeanTesterHome.JNDI_NAME);
      CacheObjectMeanTester cacheTest = home.create();
      cacheTest.bind("id12345");
   }


   public static Test suite() throws Exception

Examples of org.jboss.test.cluster.cache.bean.TreeCacheAopTesterHome.create()

   {
      super.setUp();
      log.info("setUp() ....");
      TreeCacheAopTesterHome home = (TreeCacheAopTesterHome)
            getInitialContext().lookup(TreeCacheAopTesterHome.JNDI_NAME);
      tester = home.create(null, // no need for cluster name
            null, // no need for properties
            1);
   }

   protected void tearDown() throws Exception

Examples of org.jboss.test.cluster.ejb2.basic.interfaces.EntityPKHome.create()

         msg = "Found EntityPK, bean="+bean;
         log.info(msg);
      }
      catch(FinderException e)
      {
         EntityPK bean = home.create(theKey.aBoolean, theKey.anInt, theKey.aLong,
            theKey.aDouble, theKey.aString);
         msg = "Created EntityPK, bean="+bean;
         log.info(msg);
      }
      catch(Exception e)

Examples of org.jboss.test.cluster.ejb2.basic.interfaces.SessionToEntityHome.create()

      InitialContext ctx1 = new InitialContext(env1);

      SessionToEntityHome home1 =
         (SessionToEntityHome) ctx1.lookup("cif.StatefulSession");
      AComplexPK key = new AComplexPK(true, 0, 0, 0, "testCacheInvalidation");
      SessionToEntity bean1 = home1.create(key);
      String msg = bean1.createEntity();
      log.info("create#1, "+msg);
      // Call accessEntity twice to validate data is consistent on both nodes
      NodeAnswer answer1 = bean1.accessEntity();
      log.info("Answer1: "+answer1);

Examples of org.jboss.test.cluster.ejb2.basic.interfaces.StatelessSessionHome.create()

      StatelessSessionHome  statelessSessionHome =
      (StatelessSessionHome) ctx.lookup("nextgen_StatelessSession");
      if (statelessSessionHome!= null ) getLog().debug("ok");
         getLog().debug(++test+"- "+"Calling create on StatelessSessionHome...");
      StatelessSession statelessSession =
      (StatelessSession)statelessSessionHome.create();
      assertTrue("statelessSessionHome.create() != null", statelessSession != null);
      getLog().debug("ok");
     
      getLog().debug(++test+"- "+"Calling getEJBHome() on StatelessSession...");
      assertTrue("statelessSession.getEJBHome() != null", statelessSession.getEJBHome() != null);

Examples of org.jboss.test.cluster.ejb2.crossserver.CalledHome.create()

      // lookup binding locally on Node0 - should succeed
      Context naming = getContext(NODE0_JNDI);
      CalledHome home = (CalledHome)lookup(naming, CALLED_HOME_KEY, true);
      if (home != null)
      { // ensure that EJB is operational 
         CalledRemote remote = home.create();
         remote.remove();
      }
      closeContext(naming);
      assertNotNull("lookup EJB binding on same server using local JNDI", home);
     

Examples of org.jboss.test.cluster.ejb2.ustxsticky.UserTransactionStickyHome.create()

         tx = (UserTransaction)ctx.lookup("UserTransaction");
         tx.begin();
         try
         {
            UserTransactionStickyHome home = (UserTransactionStickyHome)ctx.lookup(jndiName);
            UserTransactionStickyRemote bean = home.create();
            for (int j = 1; j <= numCallsPerTx; j++)
            {
               String origin = "tx" + i + "-c" + j;           
               log(origin + " " + bean.amISticky());
            }

Examples of org.jboss.test.cluster.ejb3.stateful.StatefulHome.create()

      client.setSimple("somebody", "password");
      client.login();
     
      StatefulHome home = (StatefulHome)getInitialContext().lookup("StatefulBean/home");
      assertNotNull(home);
      javax.ejb.EJBObject stateful = (javax.ejb.EJBObject)home.create();
      assertNotNull(stateful);
   }
  
   public void testStatefulTx() throws Exception
   {
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.