Examples of create()


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

      Context ctx  = getInitialContext();
      Object ref = ctx.lookup("txiiop/StatefulSessionBean");
      StatefulSessionHome home =
         (StatefulSessionHome) PortableRemoteObject.narrow(
                                               ref, StatefulSessionHome.class);
      StatefulSession bean = home.create("testUserTx");

      bean.setCounter(100);
      getLog().debug("Try to instantiate a UserTransaction");
      UserTransaction userTx = (UserTransaction)ctx.lookup("UserTransaction");
      userTx.begin();

Examples of org.jboss.test.txtimer.interfaces.TimerEntityHome.create()

      List timerHandles = pp.listTimerHandles();
      assertEquals("unexpected handle count", 0, timerHandles.size());

      InitialContext iniCtx = getInitialContext();
      TimerEntityHome home = (TimerEntityHome)iniCtx.lookup(TimerEntityHome.JNDI_NAME);
      TimerEntity entity = home.create(new Integer(1));
      try
      {
         entity.createTimer(500, 0, null);

         timerHandles = pp.listTimerHandles();

Examples of org.jboss.test.txtimer.interfaces.TimerFacadeHome.create()

      InitialContext iniCtx = getInitialContext();
      TimerEntityHome entityHome = (TimerEntityHome) iniCtx.lookup(TimerEntityHome.JNDI_NAME);
      TimerEntity entity = entityHome.create(new Integer(1));

      TimerFacadeHome facadeHome = (TimerFacadeHome) iniCtx.lookup(TimerFacadeHome.JNDI_NAME);
      TimerFacade facade = facadeHome.create();
      try
      {
         facade.rollbackAfterCreateEntity(500);
         assertTrue("Timer list should be empty", entity.getTimers().size() == 0);
         sleep(1000);

Examples of org.jboss.test.txtimer.interfaces.TimerSessionHome.create()

      List timerHandles = pp.listTimerHandles();
      assertEquals("unexpected handle count", 0, timerHandles.size());

      InitialContext iniCtx = getInitialContext();
      TimerSessionHome home = (TimerSessionHome)iniCtx.lookup(TimerSessionHome.JNDI_NAME);
      TimerSession session = home.create();
      session.resetCallCount();
      try
      {
         // insert a timer into the db
         ObjectName oname = ObjectNameFactory.create("jboss.j2ee:jndiName=test/txtimer/TimerSession,service=EJB");

Examples of org.jboss.test.txtimer.interfaces.TimerTestHome.create()

  
   public void testCreateRequiredCancelRequired() throws Exception
   {
      InitialContext iniCtx = getInitialContext();
      TimerTestHome home = (TimerTestHome) iniCtx.lookup(TimerTestHome.JNDI_NAME);
      TimerTest session = home.create();
     
      try
      {
         int initialTimerCount;
         int createdTimerCount;

Examples of org.jboss.test.web.interfaces.EntityFacadeHome.create()

        try
        {
            InitialContext ctx = new InitialContext();
            Context enc = (Context) ctx.lookup("java:comp/env");
            EntityFacadeHome home = (EntityFacadeHome) enc.lookup("ejb/EntityFacade");
            EntityFacade bean = home.create();
            bean.write(7890, true);
            bean.write(7890, false);
            bean.remove();
        }
        catch(Exception e)

Examples of org.jboss.test.web.interfaces.EntityHome.create()

            }
            catch(Exception e)
            {
               //ignore
            }
            Entity bean = home.create(12345, 6789);
            bean.write(7890);
            bean.read();
            bean.remove();
        }
        catch(Exception e)

Examples of org.jboss.test.web.interfaces.InternalEntityHome.create()

         InitialContext ctx = new InitialContext();
         InternalEntityHome home = (InternalEntityHome) ctx.lookup("java:comp/env/ejb/InternalEntity");
         InternalEntity bean;
         if( create == true )
         {
            bean = home.create(value, value);
         }
         else
         {
            Integer pk = new Integer(value);
            bean = home.findByPrimaryKey(pk);

Examples of org.jboss.test.web.interfaces.RunAsTargetLocalHome.create()

      {
         InitialContext ctx = new InitialContext();
         RunAsTargetLocalHome home = null;
         Context enc = (Context) ctx.lookup("java:comp/env");
         home = (RunAsTargetLocalHome) enc.lookup(ejbName);
         RunAsTargetLocal bean = home.create();
         bean.checkRunAs();
      }
      catch(Exception e)
      {
         throw new ServletException("Access to failed to method: checkRunAs", e);

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

        try
        {
            InitialContext ctx = new InitialContext();
            Context enc = (Context) ctx.lookup("java:comp/env");
            StatelessSessionHome home = (StatelessSessionHome) enc.lookup("ejb/OptimizedEJB");
            StatelessSession bean = home.create();
            optimized = runRemoteTest(bean, true);

            home = (StatelessSessionHome) enc.lookup("ejb/NotOptimizedEJB");
            bean = home.create();
            notOptimized = runRemoteTest(bean, false);
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.