Examples of WorkContext


Examples of javax.resource.spi.work.WorkContext

         {
            boolean found = false;
            Iterator<WorkContext> it = contexts.iterator();
            while (!found && it.hasNext())
            {
               WorkContext wc = it.next();
               if (wc instanceof HintsContext)
               {
                  HintsContext hc = (HintsContext)wc;
                  Serializable value = hc.getHints().get(HintsContext.LONGRUNNING_HINT);
                  boolean longRunning = true;
View Full Code Here

Examples of javax.resource.spi.work.WorkContext

         {
            boolean found = false;
            Iterator<WorkContext> it = contexts.iterator();
            while (!found && it.hasNext())
            {
               WorkContext wc = it.next();
               if (wc instanceof HintsContext)
               {
                  HintsContext hc = (HintsContext)wc;
                  if (hc.getHints().containsKey(HintsContext.LONGRUNNING_HINT))
                  {
View Full Code Here

Examples of org.apache.tuscany.spi.component.WorkContext

                runnable.run();
                return null;
            }
        });
        replay(scheduler);
        WorkContext context = createMock(WorkContext.class);
        Message msg = new MessageImpl();
        Interceptor next = EasyMock.createMock(Interceptor.class);
        EasyMock.expect(next.invoke(EasyMock.eq(msg))).andReturn(msg);
        EasyMock.replay(next);
        Interceptor interceptor = new NonBlockingBridgingInterceptor(scheduler, context, next);
View Full Code Here

Examples of org.apache.tuscany.spi.component.WorkContext

    }

    public void testCheckedException() throws Exception {
        Map<Method, InboundInvocationChain> chains = new HashMap<Method, InboundInvocationChain>();
        chains.put(checkedMethod, createChain(checkedMethod, checkedOperation));
        WorkContext workContext = EasyMock.createNiceMock(WorkContext.class);
        EasyMock.replay(workContext);
        JDKInboundInvocationHandler handler = new JDKInboundInvocationHandler(chains, workContext);
        try {
            InboundInvocationErrorTestCase.TestBean proxy = (InboundInvocationErrorTestCase.TestBean) Proxy
                .newProxyInstance(Thread.currentThread().getContextClassLoader(),
View Full Code Here

Examples of org.apache.tuscany.spi.component.WorkContext

    }

    public void testRuntimeException() throws Exception {
        Map<Method, InboundInvocationChain> chains = new HashMap<Method, InboundInvocationChain>();
        chains.put(runtimeMethod, createChain(runtimeMethod, runtimeOperation));
        WorkContext workContext = EasyMock.createNiceMock(WorkContext.class);
        EasyMock.replay(workContext);
        JDKInboundInvocationHandler handler = new JDKInboundInvocationHandler(chains, workContext);
        try {
            InboundInvocationErrorTestCase.TestBean proxy = (InboundInvocationErrorTestCase.TestBean) Proxy
                .newProxyInstance(Thread.currentThread().getContextClassLoader(),
View Full Code Here

Examples of org.apache.tuscany.spi.component.WorkContext

                runnable.run();
                return null;
            }
        });
        replay(scheduler);
        WorkContext context = createMock(WorkContext.class);
        Method method = AsyncTarget.class.getMethod("invoke");
        method.setAccessible(true);
        InboundWire wire = createMock(InboundWire.class);
        AsyncGroovyInvoker invoker = new AsyncGroovyInvoker("invoke", wire, component, monitor, context);
        Message msg = new MessageImpl();
View Full Code Here

Examples of org.apache.tuscany.spi.component.WorkContext

        EasyMock.expect(outboundWire.getInvocationChains()).andReturn(map).once();
        EasyMock.replay(outboundWire);

        TuscanyAxisConfigurator tuscanyAxisConfigurator = new TuscanyAxisConfigurator();
        ConfigurationContext configurationContext = tuscanyAxisConfigurator.getConfigurationContext();
        WorkContext workContext = EasyMock.createNiceMock(WorkContext.class);
        EasyMock.replay(workContext);
        Axis2Service axis2Service =
            new Axis2Service(serviceName,
                contract,
                null,
View Full Code Here

Examples of org.apache.tuscany.spi.component.WorkContext

        EasyMock.replay(wireService);
        CompositeComponent parent = EasyMock.createNiceMock(CompositeComponent.class);
        // TODO figure out what to do with the service contract
        ServiceContract<?> contract = new WSDLServiceContract();
        contract.setInterfaceClass(Greeter.class);
        WorkContext workContext = EasyMock.createNiceMock(WorkContext.class);
        EasyMock.replay(workContext);
        return new Axis2Reference(serviceName,
                parent,
                wireService,
                wsBinding,
View Full Code Here

Examples of org.apache.tuscany.spi.component.WorkContext

* @version $Rev: 451895 $ $Date: 2006-10-01 23:58:18 -0700 (Sun, 01 Oct 2006) $
*/
public class ModuleScopeInstanceLifecycleTestCase extends TestCase {

    public void testInitDestroy() throws Exception {
        WorkContext ctx = new WorkContextImpl();
        ModuleScopeContainer scope = new ModuleScopeContainer(ctx);
        scope.start();

        SystemAtomicComponent initDestroyContext = MockFactory.createAtomicComponent("InitDestroy",
            scope,
View Full Code Here

Examples of org.apache.tuscany.spi.component.WorkContext

        scope.stop();
    }

    public void testDestroyOrder() throws Exception {
        WorkContext ctx = new WorkContextImpl();
        ModuleScopeContainer scope = new ModuleScopeContainer(ctx);
        scope.start();

        SystemAtomicComponent oneCtx = MockFactory.createAtomicComponent("one",
            scope,
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.