Examples of ServiceAssembly


Examples of org.apache.servicemix.jbi.deployment.ServiceAssembly

            throw new DeploymentException(errStr, e);
        }
    }

    protected void updateServiceAssembly(ArchiveEntry entry, boolean autoStart, File tmpDir, Descriptor root) throws DeploymentException {
        ServiceAssembly sa = root.getServiceAssembly();
        String name = sa.getIdentification().getName();
        entry.type = "assembly";
        entry.name = name;
        try {
            if (deploymentService.isSaDeployed(name)) {
                deploymentService.shutDown(name);
View Full Code Here

Examples of org.apache.servicemix.jbi.deployment.ServiceAssembly

            throw new DeploymentException(errStr, e);
        }
    }

    protected void updateServiceAssembly(ArchiveEntry entry, boolean autoStart, File tmpDir, Descriptor root) throws DeploymentException {
        ServiceAssembly sa = root.getServiceAssembly();
        String name = sa.getIdentification().getName();
        entry.type = "assembly";
        entry.name = name;
        try {
            if (deploymentService.isSaDeployed(name)) {
                deploymentService.shutDown(name);
View Full Code Here

Examples of org.apache.servicemix.jbi.deployment.ServiceAssembly

                throw ManagementSupport.failure("deploy", "Unable to build jbi descriptor: " + saZipURL, e);
            }
            if (root == null) {
                throw ManagementSupport.failure("deploy", "Unable to find jbi descriptor: " + saZipURL);
            }
            ServiceAssembly sa = root.getServiceAssembly();
            if (sa == null) {
                throw ManagementSupport.failure("deploy", "JBI descriptor is not an assembly descriptor: " + saZipURL);
            }
            return deployServiceAssembly(tmpDir, sa);
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.servicemix.jbi.deployment.ServiceAssembly

                String assemblyName = files[i].getName();
                try {
                    ServiceAssemblyEnvironment env = environmentContext.getServiceAssemblyEnvironment(assemblyName);
                    Descriptor root = DescriptorFactory.buildDescriptor(env.getInstallDir());
                    if (root != null) {
                        ServiceAssembly sa = root.getServiceAssembly();
                        if (sa != null && sa.getIdentification() != null) {
                            registry.registerServiceAssembly(sa, env);
                        }
                    }
                } catch (Exception e) {
                    LOG.error("Failed to initialized service assembly: " + assemblyName, e);
View Full Code Here

Examples of org.servicemix.jbi.deployment.ServiceAssembly

     */
    public String deploy(String saZipURL) throws Exception {
        String result = null;
        File tmpDir = AutoDeploymentService.unpackLocation(environmentContext.getTmpDir(), saZipURL);
        Descriptor root = AutoDeploymentService.buildDescriptor(tmpDir);
        ServiceAssembly sa = root.getServiceAssembly();
        if (sa != null) {
            result = deploy(tmpDir, sa);
        }
        else {
            throw new DeploymentException("Not an assembly: " + saZipURL);
View Full Code Here

Examples of org.servicemix.jbi.deployment.ServiceAssembly

     * @return Result/Status of the SA undeployment.
     * @throws Exception if compelete undeployment fails.
     */
    public String undeploy(String saName) throws Exception {
        String result = null;
        ServiceAssembly sa = (ServiceAssembly) serviceAssembilies.remove(saName);
        if (sa != null) {
            String assemblyName = sa.getIdentification().getName();
            File saDirectory = environmentContext.createSALibDirectory(assemblyName);
            ServiceUnit[] sus = sa.getServiceUnits();
            if (sus != null) {
                for (int i = 0;i < sus.length;i++) {
                    undeployServiceUnit(sus[i]);
                }
            }
View Full Code Here

Examples of org.servicemix.jbi.deployment.ServiceAssembly

    public String[] getDeployedServiceUnitList(String componentName) throws Exception {
        String[] result = null;
        // iterate through the service assembilies
        List tmpList = new ArrayList();
        for (Iterator iter = serviceAssembilies.values().iterator();iter.hasNext();) {
            ServiceAssembly sa = (ServiceAssembly) iter.next();
            ServiceUnit[] sus = sa.getServiceUnits();
            if (sus != null) {
                for (int i = 0;i < sus.length;i++) {
                    if (sus[i].getTarget().getComponentName().equals(componentName)) {
                        tmpList.add(sus[i].getIdentification().getName());
                    }
View Full Code Here

Examples of org.servicemix.jbi.deployment.ServiceAssembly

     * @return descriptor of the Service Assembly.
     * @throws Exception if unable to retrieve descriptor.
     */
    public String getServiceAssemblyDescriptor(String saName) throws Exception {
        String result = null;
        ServiceAssembly sa = (ServiceAssembly) serviceAssembilies.get(saName);
        if (sa != null) {
            result = sa.getIdentification().getDescription();
        }
        return result;
    }
View Full Code Here

Examples of org.servicemix.jbi.deployment.ServiceAssembly

    public String[] getDeployedServiceAssembliesForComponent(String componentName) throws Exception {
        String[] result = null;
        // iterate through the service assembilies
        Set tmpList = new HashSet();
        for (Iterator iter = serviceAssembilies.values().iterator();iter.hasNext();) {
            ServiceAssembly sa = (ServiceAssembly) iter.next();
            ServiceUnit[] sus = sa.getServiceUnits();
            if (sus != null) {
                for (int i = 0;i < sus.length;i++) {
                    if (sus[i].getTarget().getComponentName().equals(componentName)) {
                        tmpList.add(sa.getIdentification().getName());
                    }
                }
            }
        }
        result = new String[tmpList.size()];
View Full Code Here

Examples of org.servicemix.jbi.deployment.ServiceAssembly

     * @throws Exception if unable to retrieve component list.
     */
    public String[] getComponentsForDeployedServiceAssembly(String saName) throws Exception {
        String[] result = null;
        Set tmpList = new HashSet();
        ServiceAssembly sa = (ServiceAssembly) serviceAssembilies.get(saName);
        if (sa != null) {
            ServiceUnit[] sus = sa.getServiceUnits();
            if (sus != null) {
                for (int i = 0;i < sus.length;i++) {
                    tmpList.add(sus[i].getTarget().getComponentName());
                }
            }
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.