Examples of dowork()


Examples of org.jboss.test.xa.interfaces.XATest.doWork()

        }

         // sed kicks ass
        System.out.print(++test+"- "+"Testing DB connections...");
        try {
            bean.doWork();
            log.debug("OK");
        } catch(CantSeeDataException e) {
            log.debug("sort of worked.");
            log.debug(e.getMessage());
        } catch(Exception e) {
View Full Code Here

Examples of org.mule.api.retry.RetryCallback.doWork()

            new Answer<Object>()
            {
                public Object answer(InvocationOnMock invocation) throws Throwable
                {
                    RetryCallback retryCallback = (RetryCallback) invocation.getArguments()[0];
                    retryCallback.doWork(null);
                    return null;
                }
            });

        return endpoint;
View Full Code Here

Examples of org.mule.work.MuleWorkManager.doWork()

       
        try
        {
            wm.start();
           
            wm.doWork(new Work()
            {
                public void release()
                {
                    // no-op
                }
View Full Code Here

Examples of org.springframework.aop.interceptor.SideEffectBean.doWork()

   * With the singleton, there will be change.
   */
  public void testPrototypeAndSingletonBehaveDifferently() {
    SideEffectBean singleton = (SideEffectBean) beanFactory.getBean("singleton");
    assertEquals(INITIAL_COUNT, singleton.getCount() );
    singleton.doWork();
    assertEquals(INITIAL_COUNT + 1, singleton.getCount() );
   
    SideEffectBean prototype = (SideEffectBean) beanFactory.getBean("prototype");
    assertEquals(INITIAL_COUNT, prototype.getCount() );
    prototype.doWork();
View Full Code Here

Examples of org.springframework.aop.interceptor.SideEffectBean.doWork()

    singleton.doWork();
    assertEquals(INITIAL_COUNT + 1, singleton.getCount() );
   
    SideEffectBean prototype = (SideEffectBean) beanFactory.getBean("prototype");
    assertEquals(INITIAL_COUNT, prototype.getCount() );
    prototype.doWork();
    assertEquals(INITIAL_COUNT, prototype.getCount() );
  }


}
View Full Code Here

Examples of org.springframework.aop.interceptor.SideEffectBean.doWork()

   * with one another.
   */
  public void testUseDifferentManagedInstancesInSameThread() {
    SideEffectBean apartment = (SideEffectBean) beanFactory.getBean("apartment");
    assertEquals(INITIAL_COUNT, apartment.getCount() );
    apartment.doWork();
    assertEquals(INITIAL_COUNT + 1, apartment.getCount() );
 
    ITestBean test = (ITestBean) beanFactory.getBean("threadLocal2");
    assertEquals("Rod", test.getName());
    assertEquals("Kerry", test.getSpouse().getName());
View Full Code Here

Examples of org.springframework.aop.interceptor.SideEffectBean.doWork()

  }

  public void testReuseInSameThread() {
    SideEffectBean apartment = (SideEffectBean) beanFactory.getBean("apartment");
    assertEquals(INITIAL_COUNT, apartment.getCount() );
    apartment.doWork();
    assertEquals(INITIAL_COUNT + 1, apartment.getCount() );
   
    apartment = (SideEffectBean) beanFactory.getBean("apartment");
    assertEquals(INITIAL_COUNT + 1, apartment.getCount() );
  }
View Full Code Here

Examples of org.springframework.aop.interceptor.SideEffectBean.doWork()

  public void testCanGetStatsViaMixin() {
    ThreadLocalTargetSourceStats stats = (ThreadLocalTargetSourceStats) beanFactory.getBean("apartment");
    // +1 because creating target for stats call counts
    assertEquals(1, stats.getInvocationCount());
    SideEffectBean apartment = (SideEffectBean) beanFactory.getBean("apartment");
    apartment.doWork();
    // +1 again
    assertEquals(3, stats.getInvocationCount());
    // + 1 for states call!
    assertEquals(3, stats.getHitCount());
    apartment.doWork();
View Full Code Here

Examples of org.springframework.aop.interceptor.SideEffectBean.doWork()

    apartment.doWork();
    // +1 again
    assertEquals(3, stats.getInvocationCount());
    // + 1 for states call!
    assertEquals(3, stats.getHitCount());
    apartment.doWork();
    assertEquals(6, stats.getInvocationCount());
    assertEquals(6, stats.getHitCount());
    // Only one thread so only one object can have been bound
    assertEquals(1, stats.getObjectCount());
  }
View Full Code Here

Examples of org.springframework.tests.sample.beans.SideEffectBean.doWork()

  }

  private void testFunctionality(String name) {
    SideEffectBean pooled = (SideEffectBean) beanFactory.getBean(name);
    assertEquals(INITIAL_COUNT, pooled.getCount());
    pooled.doWork();
    assertEquals(INITIAL_COUNT + 1, pooled.getCount());

    pooled = (SideEffectBean) beanFactory.getBean(name);
    // Just check that it works--we can't make assumptions
    // about the count
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.