Examples of SharedLibrary


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

            throw new Exception("Unable to find shared library " + location);
        }
    }

    public void doUninstallSharedLibrary(String aSharedLibName) throws Exception {
        SharedLibrary library = deployer.getSharedLibrary(aSharedLibName);
        if (library == null) {
            throw ManagementSupport.failure("uninstall", "Shared library has not been installed: " + aSharedLibName);
        }
        AbstractInstaller installer = deployer.getInstaller(library);
        if (installer == null) {
View Full Code Here

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

     * @return
     */
    public String listSharedLibraries(String componentName, String sharedLibraryName) throws Exception {
        Set<SharedLibrary> libs = new HashSet<SharedLibrary>();
        if (sharedLibraryName != null && sharedLibraryName.length() > 0) {
            SharedLibrary lib = getDeployer().getSharedLibrary(sharedLibraryName);
            if (lib != null) {
                libs.add(lib);
            }
        } else if (componentName != null && componentName.length() > 0) {
            Component component = deployer.getComponent(componentName);
View Full Code Here

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

        return descriptor.getSharedLibrary().getIdentification().getName();
    }

    public ObjectName install() throws JBIException {
        try {
            SharedLibrary sl = deployer.registerSharedLibrary(bundle, descriptor.getSharedLibrary(), createClassLoader());
            return deployer.getNamingStrategy().getObjectName(sl);
        } catch (Exception e) {
            LOGGER.error(e.getMessage());
            throw new JBIException(e);
        }
View Full Code Here

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

    public void uninstall(boolean force) throws Exception {
        // Shut down
        stop(force);
        // Retrieve shared library
        SharedLibrary library = deployer.getSharedLibrary(getName());
        if (library == null && !force) {
            throw ManagementSupport.failure("uninstallSharedLibrary", "SharedLibrary '" + getName() + "' is not installed.");
        }
        // Check that it is not used by a running component
        if (library.getComponents().length > 0 && !force) {
            StringBuilder sb = new StringBuilder();
            for (Component comp : library.getComponents()) {
                if (sb.length() > 0) {
                    sb.append(", ");
                }
                sb.append(comp.getName());
            }
View Full Code Here

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

    private ObjectName initComponent() throws Exception {
        ComponentDesc componentDesc = installationContext.getDescriptor();
        List<SharedLibrary> libs = new ArrayList<SharedLibrary>();
        if (componentDesc.getSharedLibraries() != null) {
            for (SharedLibraryList sll : componentDesc.getSharedLibraries()) {
                SharedLibrary lib = deployer.getSharedLibrary(sll.getName());
                if (lib == null) {
                    // TODO: throw exception here ?
                } else {
                    libs.add(lib);
                }
View Full Code Here

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

    private ObjectName initComponent() throws Exception {
        ComponentDesc componentDesc = installationContext.getDescriptor();
        List<SharedLibrary> libs = new ArrayList<SharedLibrary>();
        if (componentDesc.getSharedLibraries() != null) {
            for (SharedLibraryList sll : componentDesc.getSharedLibraries()) {
                SharedLibrary lib = deployer.getSharedLibrary(sll.getName());
                if (lib == null) {
                    // TODO: throw exception here ?
                } else {
                    libs.add(lib);
                }
View Full Code Here

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

     * @return
     */
    public String listSharedLibraries(String componentName, String sharedLibraryName) throws Exception {
        Set<SharedLibrary> libs = new HashSet<SharedLibrary>();
        if (sharedLibraryName != null && sharedLibraryName.length() > 0) {
            SharedLibrary lib = getDeployer().getSharedLibrary(sharedLibraryName);
            if (lib != null) {
                libs.add(lib);
            }
        } else if (componentName != null && componentName.length() > 0) {
            Component component = deployer.getComponent(componentName);
View Full Code Here

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

        return descriptor.getSharedLibrary().getIdentification().getName();
    }

    public ObjectName install() throws JBIException {
        try {
            SharedLibrary sl = deployer.registerSharedLibrary(bundle, descriptor.getSharedLibrary(), createClassLoader());
            return deployer.getEnvironment().getManagedObjectName(sl);
        } catch (Exception e) {
            LOGGER.error(e.getMessage());
            throw new JBIException(e);
        }
View Full Code Here

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

    public void uninstall(boolean force) throws Exception {
        // Shut down
        stop(force);
        // Retrieve shared library
        SharedLibrary library = deployer.getSharedLibrary(getName());
        if (library == null && !force) {
            throw ManagementSupport.failure("uninstallSharedLibrary", "SharedLibrary '" + getName() + "' is not installed.");
        }
        // Check that it is not used by a running component
        if (library.getComponents().length > 0 && !force) {
            StringBuilder sb = new StringBuilder();
            for (Component comp : library.getComponents()) {
                if (sb.length() > 0) {
                    sb.append(", ");
                }
                sb.append(comp.getName());
            }
View Full Code Here

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

        // lets force the JBI container to be constructed first
        Descriptor root = (Descriptor) context.getBeansOfType(Descriptor.class).values().iterator().next();
        assertNotNull("JBI Container not found in spring!", root);

        SharedLibrary sl = root.getSharedLibrary();
        Identification identification = sl.getIdentification();
        assertEquals("getName", "TestSharedLibrary", identification.getName());
        assertEquals("getDescription", "This is a test shared library.", identification.getDescription());
       
    }
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.