Package org.servicemix.jbi.deployment

Examples of org.servicemix.jbi.deployment.ServiceAssembly


     * @return State of the service assembly.
     * @throws Exception if operation fails.
     */
    public String getState(String serviceAssemblyName) throws Exception {
        String result = DeploymentServiceMBean.STOPPED;
        ServiceAssembly sa = (ServiceAssembly) serviceAssembilies.get(serviceAssemblyName);
        if (sa != null) {
            result = sa.getState();
        }
        return result;
    }
View Full Code Here


            if (files != null) {
                for (int i = 0;i < files.length;i++) {
                    if (files[i].isDirectory()) {
                        Descriptor root = AutoDeploymentService.buildDescriptor(files[i]);
                        if (root != null) {
                            ServiceAssembly sa = root.getServiceAssembly();
                            if (sa != null && sa.getIdentification() != null) {
                                String name = sa.getIdentification().getName();
                                try {
                                    initSA(sa);
                                    sa.setState(DeploymentServiceMBean.STARTED);
                                    serviceAssembilies.put(name, sa);
                                    buildConnections(sa);
                                }
                                catch (JBIException e) {
                                    log.warn("Failed to deploy Service Assembly: " + name, e);
View Full Code Here

                }
                else if (root.getSharedLibrary() != null) {
                    installationService.doInstallSharedLibrary(tmp, root.getSharedLibrary());
                }
                else if (root.getServiceAssembly() != null) {
                    ServiceAssembly sa = root.getServiceAssembly();
                    String name = sa.getIdentification().getName();
                    try {
                        if (deploymentService.isSaDeployed(name)) {
                            deploymentService.shutDown(name);
                            deploymentService.undeploy(name);
                            deploymentService.deploy(tmp, sa);
View Full Code Here

        File tmpDir = (File) pendingSAs.remove(componentName);
        if (tmpDir != null) {
            try {
                Descriptor root = AutoDeploymentService.buildDescriptor(tmpDir);
                if (root != null) {
                    ServiceAssembly sa = root.getServiceAssembly();
                    if (sa != null && sa.getIdentification() != null) {
                        String name = sa.getIdentification().getName();
                        log.info("auto deploying Service Assembly: " + name);
                        if (!deploymentService.isSaDeployed(name)) {
                            deploymentService.deploy(tmpDir, sa);
                            deploymentService.start(name);
                        }
View Full Code Here

    private void autoRemoveSAs(String componentName) {
        for (Iterator i = descriptorMap.entrySet().iterator();i.hasNext();) {
            Map.Entry entry = (Map.Entry) i.next();
            Descriptor root = (Descriptor) entry.getValue();
            if (root != null && root.getServiceAssembly() != null) {
                ServiceAssembly sa = root.getServiceAssembly();
                String name = sa.getIdentification().getName();
                if (deploymentService.isSaDeployed(name)) {
                    // remove
                    try {
                        deploymentService.shutDown(name);
                        deploymentService.undeploy(name);
View Full Code Here

                    String name = root.getSharedLibrary().getIdentification().getName();
                    log.info("removing shared library: " + name);
                    installationService.uninstallSharedLibrary(name);
                }
                if (root.getServiceAssembly() != null) {
                    ServiceAssembly sa = root.getServiceAssembly();
                    String name = sa.getIdentification().getName();
                    log.info("removing service assembly " + name);
                    try {
                        if (deploymentService.isSaDeployed(name)) {
                            deploymentService.shutDown(name);
                            deploymentService.undeploy(name);
View Full Code Here

            if (root.getComponent() != null) {
                String componentName = root.getComponent().getIdentification().getName();
                exists = container.getRegistry().isLocalComponentRegistered(componentName);
            }
            else if (root.getServiceAssembly() != null) {
                ServiceAssembly sa = root.getServiceAssembly();
                String name = sa.getIdentification().getName();
                exists = deploymentService.isSaDeployed(name);
            }
            else if (root.getSharedLibrary() != null) {
                String name = root.getSharedLibrary().getIdentification().getName();
                exists = installationService.containsSharedLibrary(name);
View Full Code Here

TOP

Related Classes of org.servicemix.jbi.deployment.ServiceAssembly

Copyright © 2018 www.massapicom. 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.