Package org.apache.servicemix.jbi.deployer

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


     * @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

        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

    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

    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

    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

     * @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

        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

    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

TOP

Related Classes of org.apache.servicemix.jbi.deployer.SharedLibrary

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.