Package org.apache.tuscany.spi.component

Examples of org.apache.tuscany.spi.component.ScopeContainer.stop()


            }
        }, null);
        executor.execute(future);
        future.get();
        requestScope.stop();
        statelessScope.stop();
    }

    /**
     * Tests a stateless-to-session scoped wire is setup properly by the runtime
     */
 
View Full Code Here


        assertEquals("bar", target2.getString());
        assertEquals("bar", source.getTarget().getString());
        sessionScope.onEvent(new HttpSessionEnd(this, session2));

        ctx.clearIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER);
        sessionScope.stop();
        statelessScope.stop();
    }


    /**
 
View Full Code Here

        source.getTarget().setString("bar");
        assertEquals("bar", target2.getString());
        assertEquals("bar", source.getTarget().getString());

        moduleScope.onEvent(new CompositeStop(this, null));
        moduleScope.stop();
        statelessScope.stop();
    }

    protected void setUp() throws Exception {
        super.setUp();
View Full Code Here

        Target target = (Target) parent.getSystemChild("target").getServiceInstance();
        assertNotNull(target);
        assertSame(target, source.getTarget());
        scope.onEvent(new CompositeStop(this, parent));
        parent.stop();
        scope.stop();
    }

    /**
     * Validates building a wire from an atomic context to a reference context
     */
 
View Full Code Here

        Target target = (Target) parent.getSystemChild("target").getServiceInstance();
        assertNotNull(target);
        assertSame(target, source.getTarget());
        scope.onEvent(new CompositeStop(this, parent));
        grandParent.stop();
        scope.stop();
    }


    /**
     * Validates building a wire from a service context to an atomic context
View Full Code Here

        Target target2 = (Target) parent.getSystemChild("target").getServiceInstance();
        assertNotNull(target);
        assertSame(target, target2);
        scope.onEvent(new CompositeStop(this, parent));
        parent.stop();
        scope.stop();

    }

    protected void setUp() throws Exception {
        super.setUp();
View Full Code Here

            MockFactory.createJavaComponent("foo", scope, Echo.class);
        scope.register(component);
        JavaTargetInvoker invoker = new JavaTargetInvoker(echoMethod, component);
        invoker.setCacheable(false);
        assertEquals("foo", invoker.invokeTarget("foo"));
        scope.stop();
    }

    public void testClone() throws Exception {
        ScopeContainer scope = new ModuleScopeContainer(null);
        scope.start();
View Full Code Here

        scope.register(component);
        JavaTargetInvoker invoker = new JavaTargetInvoker(echoMethod, component);
        invoker.setCacheable(false);
        JavaTargetInvoker clone = invoker.clone();
        assertEquals("foo", clone.invokeTarget("foo"));
        scope.stop();
    }

    public static class Echo {
        public String echo(String message) throws Exception {
            return message;
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.