Examples of PojoBean


Examples of org.jboss.aspects.currentinvocation.test.basic.PojoBean

      // Set TCL
      Thread.currentThread().setContextClassLoader(PojoBean.class.getClassLoader());
     
      try
      {
         new PojoBean().throwException();
      }
      catch (TestException e)
      {
         TestCase.assertEquals("Current Invocation was not cleansed after exception was thrown", null,
               CurrentInvocation.getCurrentInvocation());
View Full Code Here

Examples of org.jboss.aspects.currentinvocation.test.basic.PojoBean

     
      // Initialize
      long waitForLaunch = 750L;

      // Make a new PojoBean
      PojoBean bean = new PojoBean();

      // Start a new job for Pojo to invoke and hold
      Thread otherThread = new RunPojoBeanSuspend(bean);
      otherThread.start();

      // Let the process start
      try
      {
         Thread.sleep(waitForLaunch);
      }
      catch (InterruptedException e)
      {
         throw new RuntimeException(e);
      }

      // Ensure we can't get the current invocation that's in
      // the other Thread's scope
      TestCase.assertEquals("Scoping of CurrentInvocation is not limited per Thread", null, CurrentInvocation
            .getCurrentInvocation());
     
      // Let the other Thread complete
      synchronized(bean){
         bean.notify();
      }
     
      // Wait for other thread to die
      try
      {
View Full Code Here
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.