Examples of ModuleStop


Examples of org.apache.tuscany.core.context.event.ModuleStop

        assertNotNull(target);
        CompositeContext app1 = (CompositeContext) root.getContext("app1");
        app1.publish(new ModuleStart(this));
        CompositeContext app1a = (CompositeContext) app1.getContext("app1a");
        app1a.publish(new ModuleStart(this));
        app1a.publish(new ModuleStop(this));
        app1.publish(new ModuleStop(this));
        Source source = (Source) app1a.getContext("source").getInstance(null);
        assertEquals(target, source.getTarget());
        source.getTarget().getString();
        runtime.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

    private void stopRuntime() {
        if (runtime == null) {
            return;
        }
        runtime.getSystemContext().publish(new ModuleStop(this));
       
        runtime.stop();
        runtime = null;
        getLogger().info(sm.getString("runtime.stopped"));
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        Assert.assertNotNull(test);
        EntryPoint ep = MockFactory.createEPSystemBinding("TestService1EP", ModuleScopeSystemComponent.class, "TestService1", component);
        moduleContext.registerModelObject(ep);
        GenericSystemComponent testEP = (GenericSystemComponent) moduleContext.getContext("TestService1EP").getInstance(null);
        Assert.assertNotNull(testEP);
        moduleContext.publish(new ModuleStop(this));
        moduleContext.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

            ((ModuleContext) child).locateService("TestService1EP");
            fail("Expexcted " + ServiceNotFoundException.class.getName());
        } catch (ServiceNotFoundException e) {
            // expect exception to be thrown
        }
        parent.publish(new ModuleStop(this));
        child.publish(new ModuleStop(this));
        parent.stop();

    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        EntryPoint parentEp = MockFactory.createEntryPointWithStringRef("TestService1EP", ModuleScopeSystemComponent.class,
                "TestService1", "test.child/TestService1EP");
        parent.registerModelObject(parentEp);
        Assert.assertNotNull(parent.getContext("TestService1EP").getInstance(null));

        parent.publish(new ModuleStop(this));
        child.publish(new ModuleStop(this));
        parent.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

       
        // register the second module

        // start the modules

        system.publish(new ModuleStop(this));
        runtimeContext.stop();
        Assert.assertEquals(Lifecycle.STOPPED,system.getLifecycleState());
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        Assert.assertEquals(2, mockInterceptor.getCount());
        HelloWorldService service1 = (HelloWorldService) child.getContext("target").getInstance(null);
        Assert.assertEquals(2, service1.count());
        child.publish(new RequestEnd(this, id3));

        child.publish(new ModuleStop(this));
        runtime.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        Assert.assertEquals(2, service2.count());
        Assert.assertEquals(2, service1.count()); //ensure sessions not crossed
        child.publish(new RequestEnd(this, session2));
        child.publish(new HttpSessionBound(this, session2));

        child.publish(new ModuleStop(this));
        runtime.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        Assert.assertEquals(2, mockInterceptor.getCount());
        HelloWorldService service1 = (HelloWorldService) child.getContext("target").getInstance(null);
        Assert.assertEquals(0, service1.count());
        child.publish(new RequestEnd(this, id));

        child.publish(new ModuleStop(this));
        runtime.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        Assert.assertEquals(3, mockInterceptor.getCount());
        HelloWorldService service2 = (HelloWorldService) child.getContext("target").getInstance(null);
        Assert.assertEquals(1, service2.count());
        child.publish(new RequestEnd(this, id2));

        child.publish(new ModuleStop(this));
        runtime.stop();
    }
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.