Package org.apache.servicemix.jbi.deployment

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


            }
        }
    }

    protected void updateComponent(ArchiveEntry entry, boolean autoStart, File tmpDir, Descriptor root) throws DeploymentException {
        Component comp = root.getComponent();
        String componentName = comp.getIdentification().getName();
        entry.type = "component";
        entry.name = componentName;
        try {
            if (container.getRegistry().getComponent(componentName) != null) {
                installationService.loadInstaller(componentName);
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);

        // component stuff
        Component component = root.getComponent();
        assertNotNull("component is null", component);
        assertEquals("getBootstrapClassName", "com.foo.Engine1Bootstrap", component.getBootstrapClassName());
        assertEquals("getComponentClassName", "com.foo.Engine1", component.getComponentClassName());
        assertEquals("getComponentClassPath", new ClassPath(new String[] {"Engine1.jar"}), component.getComponentClassPath());
        assertEquals("getBootstrapClassPath", new ClassPath(new String[] {"Engine2.jar"}), component.getBootstrapClassPath());

        assertEquals("getDescription", "foo", component.getDescription());

        assertArrayEquals("getSharedLibraries", new SharedLibraryList[] {new SharedLibraryList("slib1")}, component.getSharedLibraries());

        Identification identification = component.getIdentification();
        assertNotNull("identification is null", identification);
        assertEquals("getName", "example-engine-1", identification.getName());
        assertEquals("getDescription", "An example service engine", identification.getDescription());

        InstallationDescriptorExtension descriptorExtension = component.getDescriptorExtension();
        assertNotNull("descriptorExtension is null", descriptorExtension);

        DocumentFragment fragment = descriptorExtension.getDescriptorExtension();
        assertNotNull("fragment is null", fragment);
View Full Code Here

        return OperationInfoHelper.join(super.getOperationInfos(),helper.getOperationInfos());
    }

    protected InstallerMBeanImpl doInstallArchive(File tmpDirectory,Descriptor descriptor) throws DeploymentException{
        InstallerMBeanImpl installer=null;
        Component component=descriptor.getComponent();
        if(component!=null){
            installer=doInstallComponent(tmpDirectory,component);
        }
        return installer;
    }
View Full Code Here

    }
   
    private InstallerMBeanImpl createInstaller(String componentName) throws IOException, DeploymentException {
        File installationDir = environmentContext.getComponentInstallationDir(componentName);
        Descriptor root = DescriptorFactory.buildDescriptor(installationDir);
        Component descriptor = root.getComponent();

        InstallationContextImpl installationContext = new InstallationContextImpl(descriptor);
        installationContext.setInstall(false);
        installationContext.setInstallRoot(installationDir);
        // now build the ComponentContext
View Full Code Here

        }
        if (root != null) {
            try{
                container.getBroker().suspend();
                if (root.getComponent() != null) {
                    Component comp = root.getComponent();
                  String componentName = comp.getIdentification().getName();
                  entry.type = "component";
                  entry.name = componentName;
                    try {
                        if (container.getRegistry().getComponent(componentName) != null) {
                            installationService.unloadInstaller(componentName, true);
View Full Code Here

            }
        }
    }

    protected void updateComponent(ArchiveEntry entry, boolean autoStart, File tmpDir, Descriptor root) throws DeploymentException {
        Component comp = root.getComponent();
        String componentName = comp.getIdentification().getName();
        entry.type = "component";
        entry.name = componentName;
        try {
            if (container.getRegistry().getComponent(componentName) != null) {
                installationService.loadInstaller(componentName);
View Full Code Here

            }
        }
    }

    protected void updateComponent(ArchiveEntry entry, boolean autoStart, File tmpDir, Descriptor root) throws DeploymentException {
        Component comp = root.getComponent();
        String componentName = comp.getIdentification().getName();
        entry.type = "component";
        entry.name = componentName;
        try {
            if (container.getRegistry().getComponent(componentName) != null) {
                installationService.loadInstaller(componentName);
View Full Code Here

    }

    private InstallerMBeanImpl createInstaller(String componentName) throws IOException, DeploymentException {
        File installationDir = environmentContext.getComponentInstallationDir(componentName);
        Descriptor root = DescriptorFactory.buildDescriptor(installationDir);
        Component descriptor = root.getComponent();

        InstallationContextImpl installationContext = new InstallationContextImpl(descriptor);
        installationContext.setInstall(false);
        installationContext.setInstallRoot(installationDir);
        // now build the ComponentContext
View Full Code Here

        return OperationInfoHelper.join(super.getOperationInfos(), helper.getOperationInfos());
    }

    protected InstallerMBeanImpl doInstallArchive(File tmpDirectory, Descriptor descriptor) throws DeploymentException {
        InstallerMBeanImpl installer = null;
        Component component = descriptor.getComponent();
        if (component != null) {
            installer = doInstallComponent(tmpDirectory, component);
        }
        return installer;
    }
View Full Code Here

            }
        }
    }

    protected void updateComponent(ArchiveEntry entry, boolean autoStart, File tmpDir, Descriptor root) throws DeploymentException {
        Component comp = root.getComponent();
        String componentName = comp.getIdentification().getName();
        entry.type = "component";
        entry.name = componentName;
        try {
            if (container.getRegistry().getComponent(componentName) != null) {
                installationService.loadInstaller(componentName);
View Full Code Here

TOP

Related Classes of org.apache.servicemix.jbi.deployment.Component

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.