Examples of create()


Examples of org.jboss.test.testbyvalue.interfaces.ByValueEntityHome.create()

        Context ctx = new InitialContext();
        Object objhome =
                ctx.lookup("java:comp/env/ejb/TestByValueEntity");

        ByValueEntityHome home = (ByValueEntityHome) PortableRemoteObject.narrow(objhome, ByValueEntityHome.class);
        ByValueEntity entity = home.create();

        ClassWithProperty property = new ClassWithProperty();

        property.setX(1000);

Examples of org.jboss.test.testbyvalue.interfaces.ByValueStatelessSessionHome.create()

        Context ctx = new InitialContext();
        Object objhome =
                ctx.lookup("java:comp/env/ejb/CalledByValue");

        ByValueStatelessSessionHome home = (ByValueStatelessSessionHome) PortableRemoteObject.narrow(objhome, ByValueStatelessSessionHome.class);
        ByValueStatelessSession session = home.create();

        ClassWithProperty property = new ClassWithProperty();

        property.setX(1000);

Examples of org.jboss.test.testbyvalue.interfaces.RootStatelessSessionHome.create()

    {
        InitialContext ctx = new InitialContext();
        Object obj = ctx.lookup("RootTestByValue");

        RootStatelessSessionHome home = (RootStatelessSessionHome) PortableRemoteObject.narrow(obj, RootStatelessSessionHome.class);
        long time = home.create().doTestByValue(ITERATIONS);
        // I really wanted System.out as I wanted this to be sent to the XML output for ant junit tests
        System.out.println("Time spent into CallByValues over "+ITERATIONS+" iterations=" + time);
    }

    public void testByValueOnEntity() throws Exception

Examples of org.jboss.test.threading.interfaces.EJBThreadsHome.create()

               }
               catch (Exception e)
               {
                  // Bean wasn't found create it
                  try {
                     ejbTest = testHome.create("test1");
                  }
         
                  catch (Exception e2)
                  {
                     log.debug("****Create exception: " + e2);

Examples of org.jboss.test.timer.interfaces.TimerEntityExtHome.create()

  
   public void testEntityBeanTimerHasTimerServiceAfterCancellationStd() throws Exception
   {
      String jndi = "ejb/test/timer/TimerEntityExtStd";
      TimerEntityExtHome home = (TimerEntityExtHome) getEJBHome(jndi);
      TimerEntityExt entity = home.create(new Integer(333));
      entity.startTimer(SHORT_PERIOD);
      Thread.sleep(12 * SHORT_PERIOD);
      assertTrue("Timer service should be associated with bean." , entity.hasTimerService(jndi));
      entity.stopTimer();
      int lCount = entity.getTimeoutCount();

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

    */
   public void testEntityBeanTimer()
      throws Exception
   {
      TimerEntityHome home = (TimerEntityHome) getEJBHome(TimerEntityHome.JNDI_NAME);
      TimerEntity entity = home.create(new Integer(111));
      entity.startTimer(SHORT_PERIOD);
      Thread.sleep(12 * SHORT_PERIOD);
      entity.stopTimer();
      int lCount = entity.getTimeoutCount();
      assertTrue("Timeout was expected to be called at least 10 times but was "

Examples of org.jboss.test.timer.interfaces.TimerSFSBHome.create()

    */
   public void testStatefulSessionBeanTimer()
      throws Exception
   {
      TimerSFSBHome lHome = (TimerSFSBHome) getEJBHome(TimerSFSBHome.JNDI_NAME);
      TimerSFSB lBean = lHome.create();
      try
      {
         lBean.checkTimerService();
         fail("Stateful Session Bean is not allowed to get a Timer Service");
      }

Examples of org.jboss.test.timer.interfaces.TimerSLSBHome.create()

    */
   public void testStatelessSessionBeanTimer()
      throws Exception
   {
      TimerSLSBHome home = (TimerSLSBHome) getEJBHome(TimerSLSBHome.JNDI_NAME);
      TimerSLSB bean = home.create();
      byte[] handle = bean.startTimer(SHORT_PERIOD);
      Thread.sleep(12 * SHORT_PERIOD + SHORT_PERIOD);
      int count = bean.getTimeoutCount(handle);
      bean.stopTimer(handle);
      assertTrue("Timeout was expected to be called at least 10 times but was "

Examples of org.jboss.test.tm.interfaces.BMTCleanUpHome.create()

   }

   private BMTCleanUp getBean() throws Exception
   {
      BMTCleanUpHome home = (BMTCleanUpHome) getInitialContext().lookup("BMTCleanUp");
      return home.create();
   }
}

Examples of org.jboss.test.tm.interfaces.TxTimeoutHome.create()

   }
*/  
   private TxTimeout getBean() throws Exception
   {
      TxTimeoutHome home = (TxTimeoutHome) getInitialContext().lookup("jbosstest/tm/TxTimeout");
      return home.create();
   }
}
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.