Package org.apache.servicemix.jbi.deployment

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


                  entry.type = "library";
                  entry.name = libraryName;
                    installationService.doInstallSharedLibrary(tmpDir, root.getSharedLibrary());
                    checkPendingComponents();
                } else if (root.getServiceAssembly() != null) {
                    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

        // lets force the JBI container to be constructed first
        Descriptor root = (Descriptor) context.getBean("jbi");
        assertNotNull("JBI Container not found in spring!", root);

        ServiceAssembly serviceAssembly = root.getServiceAssembly();
        assertNotNull("serviceAssembly is null", serviceAssembly);

        Identification identification = serviceAssembly.getIdentification();
        assertNotNull("identification is null", identification);
        assertEquals("getName", "ServiceAssembly_041207153211-0800_saId", identification.getName());
        assertEquals("getDescription", "Description of Service Assembly : ServiceAssembly", identification.getDescription());

        ServiceUnit[] serviceUnits = serviceAssembly.getServiceUnits();
        assertNotNull("serviceUnits are null", serviceUnits);
        assertEquals("serviceUnits size", 4, serviceUnits.length);

        assertEquals("getIdentification().getName() for 0", "TransformationSU_041207152821-0800_suId", serviceUnits[0].getIdentification().getName());
        assertEquals("getIdentification().getDescription() for 0", "Description of Serviceunit: TransformationSU", serviceUnits[0].getIdentification().getDescription());
        assertEquals("getTarget().getArtifactsZip() for 0", "TransformationSU.zip", serviceUnits[0].getTarget().getArtifactsZip());
        assertEquals("getTarget().getComponentName() for 0", "SunTransformationEngine", serviceUnits[0].getTarget().getComponentName());

        assertEquals("getIdentification().getName() for 3", "SequencingEngineSU_041207152507-0800_suId", serviceUnits[3].getIdentification().getName());
        assertEquals("getIdentification().getDescription() for 3", "Description of Serviceunit: SequencingEngineSU", serviceUnits[3].getIdentification().getDescription());
        assertEquals("getTarget().getArtifactsZip() for 3", "SequencingEngineSU.zip", serviceUnits[3].getTarget().getArtifactsZip());
        assertEquals("getTarget().getComponentName() for 3", "SunSequencingEngine", serviceUnits[3].getTarget().getComponentName());
       
        Connection[] connections = serviceAssembly.getConnections().getConnections();
        assertNotNull("connections are null", connections);
        assertEquals("connections size", 2, connections.length);
       
        assertEquals("getConsumer().getServiceName() for 0", new QName("http://www.gaiati.com/emee/ns/csi", "csi-service"), connections[0].getConsumer().getServiceName());
    }
View Full Code Here

            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

            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

                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

                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) {
                    LOGGER.error("Failed to initialized service assembly: {}", assemblyName, e);
View Full Code Here

            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

            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

                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

TOP

Related Classes of org.apache.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.