Examples of LwContainerComponent


Examples of org.apache.servicemix.lwcontainer.LwContainerComponent

    container.init();
    container.start();
  }

  public void testComponentInstallation() throws Exception {
        LwContainerComponent component = new LwContainerComponent();
        container.activateComponent(component, "#ServiceMixComponent#");
        URL url = getClass().getResource("su1-src/servicemix.xml");
        File path = new File(new URI(url.toString()));
        path = path.getParentFile();
        ServiceMixClient client = new DefaultServiceMixClient(container);
       
        for (int i = 0; i < 2; i++) {
            // Deploy and start su
            component.getServiceUnitManager().deploy("su1", path.getAbsolutePath());
            component.getServiceUnitManager().init("su1", path.getAbsolutePath());
            component.getServiceUnitManager().start("su1");
           
            // Send message
            InOut inout = client.createInOutExchange();
            inout.setService(new QName("http://servicemix.apache.org/demo/", "chained"));
            client.send(inout);
           
            // Stop and undeploy
            component.getServiceUnitManager().stop("su1");
            component.getServiceUnitManager().shutDown("su1");
            component.getServiceUnitManager().undeploy("su1", path.getAbsolutePath());

            // Send message
            inout = client.createInOutExchange();
            inout.setService(new QName("http://servicemix.apache.org/demo/", "chained"));
            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.