Package javax.jbi.management

Examples of javax.jbi.management.DeploymentException


   
    public final void init(final String suName, final String suRootPath) throws DeploymentException {
        LOG.info(new Message("SU.MANAGER.INIT", LOG) + suName + " path: " + suRootPath);
    
        if (suName == null) {
            throw new DeploymentException(new Message("SU.NAME.NULL", LOG).toString());
        }
        if (suName.length() == 0) {
            throw new DeploymentException(new Message("SU.NAME.EMPTY", LOG).toString());
        }
               
        if (suRootPath == null) {
            throw new DeploymentException(new Message("SU.ROOT.NULL", LOG).toString());
        }
        if (suRootPath.length() == 0) {
            throw new DeploymentException(new Message("SU.ROOT.EMPTY", LOG).toString());
        }
       
        try {
            Thread.currentThread().setContextClassLoader(componentParentLoader);
            CXFServiceUnit csu = new CXFServiceUnit(bus, suRootPath, componentParentLoader);
            csu.prepare(ctx);
            serviceUnits.put(suName, csu);   
        } catch (Exception ex) {
            ex.printStackTrace();
            throw new DeploymentException(ex);
        }
    }
View Full Code Here


    }
   
    public final void start(final String suName) throws DeploymentException {
        LOG.info(new Message("SU.MANAGER.START", LOG) + suName);
        if (suName == null) {
            throw new DeploymentException(new Message("SU.NAME.NULL", LOG).toString());
        }
        if (suName.length() == 0) {
            throw new DeploymentException(new Message("SU.NAME.EMPTY", LOG).toString());
        }
        if (!serviceUnits.containsKey(suName)) {
            throw new DeploymentException(new Message("UNDEPLOYED.SU", LOG) + suName);
        }
       
        CXFServiceUnit csu = serviceUnits.get(suName);
        assert csu != null;
        csu.start(ctx, this);
View Full Code Here

    }
   
    public final void stop(final String suName) throws DeploymentException {
        LOG.info(new Message("SU.MANAGER.STOP", LOG) + suName);
        if (suName == null) {
            throw new DeploymentException(new Message("SU.NAME.NULL", LOG).toString());
        }
        if (suName.length() == 0) {
            throw new DeploymentException(new Message("SU.NAME.EMPTY", LOG).toString());
        }
        if (!serviceUnits.containsKey(suName)) {
            throw new DeploymentException(new Message("UNDEPLOYED.SU", LOG) + suName);
        }
        serviceUnits.get(suName).stop(ctx);
    }
View Full Code Here

    public String doInstallSharedLibrary(String location) throws Exception {
        File jarfile = new File(location);
        if (jarfile.exists()) {
            Descriptor desc = Transformer.getDescriptor(jarfile);
            if (desc.getSharedLibrary() == null) {
                throw new DeploymentException("JBI descriptor is not a shared library descriptor");
            }
            String slName = desc.getSharedLibrary().getIdentification().getName();
            LOG.info("Installing shared library " + slName);
            if (deployer.getSharedLibrary(slName) != null) {
                throw new DeploymentException("ShareLib " + slName + " is already installed");
            }
            SharedLibraryInstaller installer = new SharedLibraryInstaller(deployer, desc, jarfile, false);
            installer.installBundle();
            installer.init();
            installer.install();
View Full Code Here

     */
    public ObjectName install() throws JBIException {
        try {
            if (isModified) {
                if (isInstalled()) {
                    throw new DeploymentException("Component is already installed");
                }
                initBootstrap();
                if (bootstrap != null) {
                    bootstrap.onInstall();
                }
View Full Code Here

                }
                initialized = true;
            }
        } catch (JBIException e) {
            LOGGER.error("Could not initialize bootstrap", e);
            throw new DeploymentException(e);
        }
    }
View Full Code Here

            try {
                Thread.currentThread().setContextClassLoader(bootstrap.getClass().getClassLoader());
                bootstrap.cleanUp();
            } catch (JBIException e) {
                LOGGER.error("Could not initialize bootstrap", e);
                throw new DeploymentException(e);
            } finally {
                initialized = false;
                Thread.currentThread().setContextClassLoader(oldCl);
            }
        }
View Full Code Here

            Thread.currentThread().setContextClassLoader(cl);
            Class bootstrapClass = cl.loadClass(descriptor.getBootstrapClassName());
            return (Bootstrap) bootstrapClass.newInstance();
        } catch (ClassNotFoundException e) {
            LOGGER.error("Class not found: " + descriptor.getBootstrapClassName(), e);
            throw new DeploymentException(e);
        } catch (InstantiationException e) {
            LOGGER.error("Could not instantiate : " + descriptor.getBootstrapClassName(), e);
            throw new DeploymentException(e);
        } catch (IllegalAccessException e) {
            LOGGER.error("Illegal access on: " + descriptor.getBootstrapClassName(), e);
            throw new DeploymentException(e);
        } finally {
            Thread.currentThread().setContextClassLoader(oldCl);
        }
    }
View Full Code Here

                    String key = (String) o;
                    String val = props.getProperty(key);
                    try {
                        mbs.setAttribute(on, new Attribute(key, val));
                    } catch (JMException e) {
                        throw new DeploymentException("Could not set installation property: (" + key + " = " + val, e);
                    }
                }
            }
        }
    }
View Full Code Here

            URL url;
            try {
                url = xmls[i].toURL();
            } catch (MalformedURLException e) {
                // TODO Auto-generated catch block
                throw new DeploymentException("Error deploying xml file", e);
            }
            ep = createEndpoint(url);
            ep.setServiceUnit(su);
            su.addEndpoint(ep);
        }
View Full Code Here

TOP

Related Classes of javax.jbi.management.DeploymentException

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.