Package javax.jbi.component

Examples of javax.jbi.component.ServiceUnitManager


                 jbiServiceUnit = getAssociatedJbiServiceUnit(comp, sl);
             } catch (GBeanNotFoundException e) {
                 throw new DeploymentException("Can not find the associated service unit for this service assembly. "
                         + "Check if it's deployed and started.", e);
             }
             ServiceUnitManager serviceUnitManager = jbiServiceUnit.getServiceUnitManager();
             File installDir = new File(context.getBaseDir(), installUri.toString());
             String deploy = serviceUnitManager.deploy(name, installDir.getAbsolutePath())
             log.debug(deploy);
        }
        // Create the JBI deployment managed object
        Properties props = new Properties();
        props.put("jbiType", "JBIServiceAssembly");
View Full Code Here


            if (sus != null) {
                for (int i = 0;i < sus.length;i++) {
                    String componentName = sus[i].getTarget().getComponentName();
                    Component component = container.getComponent(componentName);
                    if (component != null) {
                        ServiceUnitManager sum = component.getServiceUnitManager();
                        if (sum != null) {
                            sum.start(sus[i].getIdentification().getName());
                        }
                    }
                }
            }
            startConnections(sa);
View Full Code Here

            if (sus != null) {
                for (int i = 0;i < sus.length;i++) {
                    String componentName = sus[i].getTarget().getComponentName();
                    Component component = container.getComponent(componentName);
                    if (component != null) {
                        ServiceUnitManager sum = component.getServiceUnitManager();
                        if (sum != null) {
                            sum.stop(sus[i].getIdentification().getName());
                        }
                    }
                }
            }
            result = DeploymentServiceMBean.STOPPED;
View Full Code Here

            if (sus != null) {
                for (int i = 0;i < sus.length;i++) {
                    String componentName = sus[i].getTarget().getComponentName();
                    Component component = container.getComponent(componentName);
                    if (component != null) {
                        ServiceUnitManager sum = component.getServiceUnitManager();
                        if (sum != null) {
                            sum.shutDown(sus[i].getIdentification().getName());
                        }
                    }
                }
            }
            result = DeploymentServiceMBean.SHUTDOWN;
View Full Code Here

                            + ") doesn't exist");
                }
            }
            Component component = container.getComponent(componentName);
            if (component != null) {
                ServiceUnitManager sum = component.getServiceUnitManager();
                if (sum != null) {
                    result = sum.deploy(name, targetDir.getAbsolutePath());
                    sum.init(name, targetDir.getAbsolutePath());
                    // register active endpoints
                }
                else {
                    FileUtil.deleteFile(targetDir);
                    throw new DeploymentException("Component " + componentName + " doesn't have a ServiceUnitManager");
View Full Code Here

            File targetDir = environmentContext.getServiceUnitDirectory(componentName, name);
            // unpack the artifact
            // now get the component and give it a SA
            Component component = container.getComponent(componentName);
            if (component != null) {
                ServiceUnitManager sum = component.getServiceUnitManager();
                if (sum != null) {
                    sum.undeploy(name, targetDir.getAbsolutePath());
                    FileUtil.deleteFile(targetDir);
                }
            }
            else {
                FileUtil.deleteFile(targetDir);
View Full Code Here

                    try {
                        File targetDir = environmentContext.getServiceUnitDirectory(componentName, name);
                        // now get the component and give it a SA
                        Component component = container.getComponent(componentName);
                        if (component != null) {
                            ServiceUnitManager sum = component.getServiceUnitManager();
                            if (sum != null) {
                                sum.deploy(name, targetDir.getAbsolutePath());
                                sum.init(name, targetDir.getAbsolutePath());
                                sum.start(name);
                            }
                            else {
                                FileUtil.deleteFile(targetDir);
                                throw new DeploymentException("Component " + componentName
                                        + " doesn't have a ServiceUnitManager");
View Full Code Here

        ServiceReference[] refs = context.getAllServiceReferences(
                "javax.jbi.component.Component", "(&(NAME=OdeBpelEngine))");
        if (refs == null || refs.length != 1) {
            throw new RuntimeException("no appropriate service :(");
        }
        ServiceUnitManager suM = ((Component) context.getService(refs[0]))
                .getServiceUnitManager();
        ClassLoader l = Thread.currentThread().getContextClassLoader();
        try {
            ClassLoader suL = suM.getClass().getClassLoader();
            Thread.currentThread().setContextClassLoader(new BundleClassLoader(suL, context.getBundle()));
            suM.deploy(generatedName, rootDir.getAbsolutePath());
            suM.init(generatedName, rootDir.getAbsolutePath());
            suM.start(generatedName);
        } finally {
            Thread.currentThread().setContextClassLoader(l);
        }

    }
View Full Code Here

        ServiceReference[] refs = context.getAllServiceReferences(
                "javax.jbi.component.Component", "(&(NAME=OdeBpelEngine))");
        if (refs == null || refs.length != 1) {
            throw new RuntimeException("no appropriate service :(");
        }
        ServiceUnitManager suM = ((Component) context.getService(refs[0]))
                .getServiceUnitManager();
        suM.shutDown(generatedName);
        suM.undeploy(generatedName, rootDir.getAbsolutePath());

    }
View Full Code Here

                 jbiServiceUnit = getAssociatedJbiServiceUnit(comp, sl);
             } catch (GBeanNotFoundException e) {
                 throw new DeploymentException("Can not find the associated service unit for this service assembly. "
                         + "Check if it's deployed and started.", e);
             }
             ServiceUnitManager serviceUnitManager = jbiServiceUnit.getServiceUnitManager();
             File installDir = new File(context.getBaseDir(), installUri.toString());
             String deploy = serviceUnitManager.deploy(name, installDir.getAbsolutePath())
             serviceUnitReferences.add(new ServiceUnitReference(sl, name, installDir.getAbsolutePath()));
             LOGGER.debug(deploy);
        }
        // Create the JBI deployment managed object
        Properties props = new Properties();
View Full Code Here

TOP

Related Classes of javax.jbi.component.ServiceUnitManager

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.