Examples of create()


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

      try
      {
         deploy("cts-v1cmp.ear");
         InitialContext ctx = new InitialContext();
         CtsCmp2SessionHome home = (CtsCmp2SessionHome) ctx.lookup("v1/CtsCmp2SessionBean");
         CtsCmp2Session session = home.create();
         session.testV1();
         log.info("Invoked CtsCmp2Session.testV1");
      }
      finally
      {

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

         InitialContext ctx = new InitialContext(env);
         Object ref = ctx.lookup("ejbcts/CMPBean");
         CtsCmpHome home = (CtsCmpHome)
               PortableRemoteObject.narrow(ref, CtsCmpHome.class);
         AccountPK pk1 = new AccountPK("bean1");
         CtsCmp bean1 = home.create(pk1, "testHomeFromRemoteNoDefaultJNDI");
         CtsCmpHome home2 = (CtsCmpHome) bean1.getEJBHome();
         AccountPK pk2 = new AccountPK("bean2");
         CtsCmp bean2 = home2.create(pk2, "testHomeFromRemoteNoDefaultJNDI");
         bean2.remove();
      }

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

      CtsCmpLocalHome home = (CtsCmpLocalHome) ctx.lookup("ejbcts/LocalCMPBean");
      AccountPK key1 = new AccountPK("1");
      CtsCmpLocal bean1 = null;
      try
      {
         bean1 = home.create(key1, "testEntityIdentity");
      }
      catch(DuplicateKeyException e)
      {
         bean1 = home.findByPrimaryKey(key1);
      }

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

  public void testLocalInterfacePassivation() throws Exception
  {
      Context ctx = new InitialContext();
      getLog().debug("+++ testLocalInterfacePassivation");
      StatefulSessionHome sessionHome = ( StatefulSessionHome ) ctx.lookup("ejbcts/StatefulSessionBean");
      StatefulSession sessionBean = sessionHome.create("testLocalInterfacePassivation");   

    getLog().debug("Creating local home");
      AccountPK pk = new AccountPK("123456789");
      sessionBean.createLocalEntity(pk, "jduke");

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

      try
      {
         Context ctx = new InitialContext();
         log.debug("+++ testPassivationByTime");
         StatefulSessionLocalHome sessionHome = ( StatefulSessionLocalHome ) ctx.lookup("ejbcts/StatefulSessionLocalBean");
         sessionBean1 = sessionHome.create("testPassivationByTimeLocal");   
         sessionBean1.ping();

       handle = sessionBean1.getHandle();

         log.debug("Waiting 41 seconds for passivation...");

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

   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()

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

   {
      StatelessSessionLocalHome home = (StatelessSessionLocalHome) sessionCtx.getEJBLocalHome();
      log.debug("Obtained StatelessSessionLocalHome from ctx");
      try
      {
         StatelessSessionLocal local = home.create();
         log.debug("Created StatelessSessionLocal#1");
         StatelessSessionLocalHome home2 = (StatelessSessionLocalHome) local.getEJBLocalHome();
         log.debug("Obtained StatelessSessionLocalHome from StatelessSessionLocal");
         local = home2.create();
         log.debug("Created StatelessSessionLocal#2");

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

      StrictlyPooledSessionHome home = (StrictlyPooledSessionHome)
            ctx.lookup("ejbcts/StrictlyPooledCreateExceptionBean");

      try
      {
         StrictlyPooledSession bean = home.create();
         fail("Create did not fail, bean="+bean);
      }
      catch(CreateException e)
      {
         log.debug("Saw expected create failure", e);

Examples of org.jboss.test.dbtest.interfaces.AllTypesHome.create()

      if (allTypes == null)
      {

         getLog().debug("not found OK");
         getLog().debug(++test + "- " + "Calling create on AllTypesHome with name seb...");
         allTypes = allTypesHome.create("seb");
      }

      if (allTypes != null)
      {
         getLog().debug("OK");

Examples of org.jboss.test.dbtest.interfaces.RecordHome.create()

         {
            record[i] = recordHome.findByPrimaryKey("bill " + i);
         }
         catch (FinderException e)
         {
            record[i] = recordHome.create("bill " + i);
         }

         record[i].setAddress("SanFrancisco, CA 9411" + i);
         allTypes.addObjectToList(record[i]);
      }
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.