Examples of AdminCommandsService


Examples of org.apache.servicemix.jbi.deployer.AdminCommandsService

                                            "installer", "zip").getPath();
        String wsdlFirst = localMavenBundle("org.apache.servicemix.samples.wsdl-first", "wsdl-first-sa",
                                            getBundleVersion("org.apache.servicemix.samples.wsdl-first", "wsdl-first-sa"),
                                            null, "zip").getPath();

        AdminCommandsService admin = getAdminCommands();

        try {
            String res = admin.installComponent(smxJsr181, null, false);
            System.err.println(res);
            fail("Call should have failed: " + res);
        } catch (Throwable t) {
            // Expected
        }

        System.err.println(admin.installSharedLibrary(smxShared, false));
        System.err.println(admin.installComponent(smxJsr181, null, false));

        try {
            String res = admin.installComponent(smxJsr181, null, false);
            System.err.println(res);
            fail("Call should have failed: " + res);
        } catch (Throwable t) {
            // Expected
        }

        System.err.println(admin.uninstallComponent("servicemix-jsr181"));

        System.err.println(admin.installComponent(smxJsr181, null, false));
        System.err.println(admin.installComponent(smxHttp, null, false));

        System.err.println(admin.startComponent("servicemix-jsr181"));
        System.err.println(admin.startComponent("servicemix-http"));

        System.err.println(admin.deployServiceAssembly(wsdlFirst, false));
        System.err.println(admin.undeployServiceAssembly("wsdl-first-sa"));

        System.err.println(admin.deployServiceAssembly(wsdlFirst, false));
        System.err.println(admin.startServiceAssembly("wsdl-first-sa"));
        System.err.println(admin.stopServiceAssembly("wsdl-first-sa"));
        System.err.println(admin.shutdownServiceAssembly("wsdl-first-sa"));
        System.err.println(admin.undeployServiceAssembly("wsdl-first-sa"));

        System.err.println(admin.stopComponent("servicemix-jsr181"));
        System.err.println(admin.stopComponent("servicemix-http"));

        System.err.println(admin.shutdownComponent("servicemix-jsr181"));
        System.err.println(admin.shutdownComponent("servicemix-http"));

        System.err.println(admin.uninstallComponent("servicemix-http"));
        System.err.println(admin.uninstallComponent("servicemix-jsr181"));

        System.err.println(admin.uninstallSharedLibrary("servicemix-shared"));
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.deployer.AdminCommandsService

     * execute the task
     *
     * @throws BuildException
     */
    public void execute() throws BuildException {
        AdminCommandsService acs;
        try {
            log("Retrieving remote admin interface", Project.MSG_DEBUG);
            connect();
            acs = getAdminCommandsService();
        } catch (Throwable e) {
View Full Code Here

Examples of org.apache.servicemix.jbi.deployer.AdminCommandsService

                                          "installer", "zip").getPath();
        String wsdlFirst = localMavenBundle("org.apache.servicemix.samples.wsdl-first", "wsdl-first-sa",
                                            getArtifactVersion("org.apache.servicemix.samples.wsdl-first", "wsdl-first-sa"),
                                            null, "zip").getPath();

        AdminCommandsService admin = getAdminCommands();
        ManagementStrategy ms = getOsgiService(ManagementStrategy.class);

        assertTrue("expected AdminCommandsService MBean", ms.isManaged(null, getAdminCommandsName(ms)));

        try {
            String res = admin.installComponent(smxJsr181, null, false);
            System.err.println(res);
            fail("Call should have failed: " + res);
        } catch (Throwable t) {
            // Expected
        }

        assertComponentMBean(ms, "servicemix-jsr181", false);

        System.err.println(admin.installSharedLibrary(smxShared, false));
        System.err.println(admin.installComponent(smxJsr181, null, false));

        assertComponentMBean(ms, "servicemix-jsr181", true);

        try {
            String res = admin.installComponent(smxJsr181, null, false);
            System.err.println(res);
            fail("Call should have failed: " + res);
        } catch (Throwable t) {
            // Expected
        }

        System.err.println(admin.shutdownComponent("servicemix-jsr181"));
        System.err.println(admin.uninstallComponent("servicemix-jsr181"));

        System.err.println(admin.installComponent(smxJsr181, null, false));

        assertComponentMBean(ms, "servicemix-jsr181", true);
        assertComponentMBean(ms, "servicemix-http", false);

        System.err.println(admin.installComponent(smxHttp, null, false));

        assertComponentMBean(ms, "servicemix-http", true);

        System.err.println(admin.startComponent("servicemix-jsr181"));
        System.err.println(admin.startComponent("servicemix-http"));

        assertFalse("unexpected ServiceAssembly MBean", ms.isManaged(null, getServiceAssemblyName(ms, "wsdl-first-sa")));

        System.err.println(admin.deployServiceAssembly(wsdlFirst, false));

        assertTrue("expected ServiceAssembly MBean", ms.isManaged(null, getServiceAssemblyName(ms, "wsdl-first-sa")));

        System.err.println(admin.undeployServiceAssembly("wsdl-first-sa"));

        System.err.println(admin.deployServiceAssembly(wsdlFirst, false));

        System.err.println(admin.startServiceAssembly("wsdl-first-sa"));
        System.err.println(admin.stopServiceAssembly("wsdl-first-sa"));
        System.err.println(admin.shutdownServiceAssembly("wsdl-first-sa"));
        System.err.println(admin.undeployServiceAssembly("wsdl-first-sa"));

        System.err.println(admin.stopComponent("servicemix-jsr181"));
        System.err.println(admin.stopComponent("servicemix-http"));

        System.err.println(admin.shutdownComponent("servicemix-jsr181"));
        System.err.println(admin.shutdownComponent("servicemix-http"));

        assertComponentMBean(ms, "servicemix-jsr181", true);
        assertComponentMBean(ms, "servicemix-http", true);

        System.err.println(admin.uninstallComponent("servicemix-http"));
        System.err.println(admin.uninstallComponent("servicemix-jsr181"));

        System.err.println(admin.uninstallSharedLibrary("servicemix-shared"));
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.deployer.AdminCommandsService

     * execute the task
     *
     * @throws BuildException
     */
    public void execute() throws BuildException {
        AdminCommandsService acs;
        try {
            log("Retrieving remote admin interface", Project.MSG_DEBUG);
            connect();
            acs = getAdminCommandsService();
        } catch (Throwable e) {
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.