Package org.jboss.test.ejb3.async

Examples of org.jboss.test.ejb3.async.AsyncLocalBusiness


      server.deploy(archive);

      // Test
      try
      {
         final AsyncLocalBusiness bean = (AsyncLocalBusiness) NAMING_CONTEXT.lookup(AsyncBean.class.getSimpleName()
               + JNDI_SUFFIX_LOCAL_BUSINESS);
         log.info(bean.toString());
         log.info(bean.getClass().toString());
         final SessionProxyInvocationHandlerBase handler = (SessionProxyInvocationHandlerBase) Proxy
               .getInvocationHandler(bean);
         log.info("INTERCEPTORS: " + Arrays.asList(handler.getInterceptors()).toString());

         final Future<Thread> invocation = bean.getThreadOfExecution();

         // Block and test
         final Thread beanThread = invocation.get(3, TimeUnit.SECONDS);
         final Thread ourThread = Thread.currentThread();
         log.info("Got: " + invocation);
View Full Code Here


   }

   public void testRemoteAsyncInvocation()
      throws Exception
   {
      final AsyncTesterCommonBusiness bean = this.getTesterBean();
       Assert.assertTrue("Remote invocation not executed in new Thread",bean.isRemoteAsyncInvocationExecutedInNewThread());
   }
View Full Code Here

   }

   public void testLocalAsyncInvocation()
      throws Exception
   {
      final AsyncTesterCommonBusiness bean = this.getTesterBean();
      Assert.assertTrue("Local invocation not executed in new Thread",bean.isLocalAsyncInvocationExecutedInNewThread());
   }
View Full Code Here

   }

   public void testNointerfaceAsyncInvocation()
      throws Exception
   {
      final AsyncTesterCommonBusiness bean = this.getTesterBean();
      Assert.assertTrue("Nointerface invocation not executed in new Thread",bean.isNointerfaceAsyncInvocationExecutedInNewThread());
   }
View Full Code Here

      final AsyncTesterCommonBusiness bean = this.getTesterBean();
      Assert.assertTrue("Nointerface invocation not executed in new Thread",bean.isNointerfaceAsyncInvocationExecutedInNewThread());
   }

   public void testLocalBlockingInvocation() throws Exception{
      final AsyncTesterCommonBusiness bean = this.getTesterBean();
      Assert.assertTrue("Local non-async invocation not executed in same Thread",bean.isLocalBlockingInvocationExecutedInSameThread());
   }
View Full Code Here

      final AsyncTesterCommonBusiness bean = this.getTesterBean();
      Assert.assertTrue("Local non-async invocation not executed in same Thread",bean.isLocalBlockingInvocationExecutedInSameThread());
   }

   public void testLocalCancel() throws Exception{
       final AsyncTesterCommonBusiness bean = this.getTesterBean();
       Assert.assertTrue("Local async call should be able to be cancelled",bean.cancelInterruptIfRunningWorksLocal());
   }
View Full Code Here

       final AsyncTesterCommonBusiness bean = this.getTesterBean();
       Assert.assertTrue("Local async call should be able to be cancelled",bean.cancelInterruptIfRunningWorksLocal());
   }

   public void testLocalRemote() throws Exception{
       final AsyncTesterCommonBusiness bean = this.getTesterBean();
       Assert.assertTrue("Remote async call should be able to be cancelled",bean.cancelInterruptIfRunningWorksRemote());
   }
View Full Code Here

   private AsyncTesterCommonBusiness getTesterBean() throws Exception {
      final InitialContext ctx = getInitialContext();
      final String jndiName = "AsyncTesterBean/remote";
      final Object ref = ctx.lookup(jndiName);
      final AsyncTesterCommonBusiness bean = (AsyncTesterCommonBusiness) ref;
      return bean;
   }
View Full Code Here

      throws Exception
   {
      InitialContext ctx = getInitialContext();
      String jndiName = "ejb3/basic/SimpleSessionBean";
      Object ref = ctx.lookup(jndiName);
      SimpleSession test = (SimpleSession) ref;
      test.ping();
   }
View Full Code Here

      throws Exception
   {
      InitialContext ctx = getInitialContext();
      String jndiName = "ejb3/basic/SimpleSessionBean";
      Object ref = ctx.lookup(jndiName);
      SimpleSession test = (SimpleSession) ref;
      test.ping();
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.ejb3.async.AsyncLocalBusiness

Copyright © 2018 www.massapicom. 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.