Package org.apache.servicemix.jbi.container

Examples of org.apache.servicemix.jbi.container.ComponentEnvironment


    }

    public void register(Component component) throws Exception {
        ComponentNameSpace cns = new ComponentNameSpace(container.getName(), component.getName());
        ComponentContextImpl context = new ComponentContextImpl(container, cns);
        ComponentEnvironment env = new ComponentEnvironment();
        env.setComponentRoot(new File(component.getRootDir()));
        env.setInstallRoot(new File(component.getInstallDir()));
        env.setWorkspaceRoot(new File(component.getWorkDir()));
        context.setEnvironment(env);
       
        container.activateComponent(null,
                      component.getComponent(),
                      component.getDescription(),
View Full Code Here


    protected void buildComponent(File componentDirectory)
            throws DeploymentException {
        try {
            String componentName = componentDirectory.getName();
            ComponentEnvironment env = container.getEnvironmentContext().getComponentEnvironment(componentName);
            if (!env.getStateFile().exists()) {
                // An installer has been created but the component has not been installed
                // So remove it
                FileUtil.deleteFile(componentDirectory);
            } else {
                InstallerMBeanImpl installer = createInstaller(componentName);
View Full Code Here

    protected ComponentContextImpl buildComponentContext(File componentRoot, File installRoot, String name)
                    throws IOException {
        ComponentNameSpace cns = new ComponentNameSpace(container.getName(), name);
        ComponentContextImpl context = new ComponentContextImpl(container, cns);
        ComponentEnvironment env = new ComponentEnvironment();
        FileUtil.buildDirectory(componentRoot);
        File privateWorkspace = environmentContext.createWorkspaceDirectory(name);
        env.setWorkspaceRoot(privateWorkspace);
        env.setComponentRoot(componentRoot);
        env.setInstallRoot(installRoot);
        context.setEnvironment(env);
        return context;
    }
View Full Code Here

    }
   
    public void register(Component component) throws Exception {
        ComponentNameSpace cns = new ComponentNameSpace(container.getName(), component.getName());
      ComponentContextImpl context = new ComponentContextImpl(container, cns);
        ComponentEnvironment env = new ComponentEnvironment();
        env.setComponentRoot(new File(component.getRootDir()));
        env.setInstallRoot(new File(component.getInstallDir()));
        env.setWorkspaceRoot(new File(component.getWorkDir()));
        context.setEnvironment(env);
       
        container.activateComponent(null,
                      component.getComponent(),
                      component.getDescription(),
View Full Code Here

    }
   
    public void register(Component component) throws Exception {
        ComponentNameSpace cns = new ComponentNameSpace(container.getName(), component.getName());
        ComponentContextImpl context = new ComponentContextImpl(container, cns);
        ComponentEnvironment env = new ComponentEnvironment();
        env.setComponentRoot(new File(component.getRootDir()));
        env.setInstallRoot(new File(component.getInstallDir()));
        env.setWorkspaceRoot(new File(component.getWorkDir()));
        context.setEnvironment(env);
       
        container.activateComponent(null,
                                    component.getComponent(),
                                    component.getDescription(),
View Full Code Here

    protected void buildComponent(File componentDirectory) throws DeploymentException {
        LOGGER.debug("Building component from directory {}" + componentDirectory.getPath());
        try {
            String componentName = componentDirectory.getName();
            ComponentEnvironment env = container.getEnvironmentContext().getComponentEnvironment(componentName);
            if (!env.getStateFile().exists()) {
                LOGGER.debug("Removing directory {} as component has not been installed (there is not state file)",
                        componentDirectory.getPath());
                // An installer has been created but the component has not been
                // installed
                // So remove it
View Full Code Here

    }

    protected ComponentContextImpl buildComponentContext(File componentRoot, File installRoot, String name) throws IOException {
        ComponentNameSpace cns = new ComponentNameSpace(container.getName(), name);
        ComponentContextImpl context = new ComponentContextImpl(container, cns);
        ComponentEnvironment env = new ComponentEnvironment();
        FileUtil.buildDirectory(componentRoot);
        File privateWorkspace = environmentContext.createWorkspaceDirectory(name);
        env.setWorkspaceRoot(privateWorkspace);
        env.setComponentRoot(componentRoot);
        env.setInstallRoot(installRoot);
        context.setEnvironment(env);
        return context;
    }
View Full Code Here

    }
   
    public void register(Component component) throws Exception {
        ComponentNameSpace cns = new ComponentNameSpace(container.getName(), component.getName());
        ComponentContextImpl context = new ComponentContextImpl(container, cns);
        ComponentEnvironment env = new ComponentEnvironment();
        env.setComponentRoot(new File(component.getRootDir()));
        env.setInstallRoot(new File(component.getInstallDir()));
        env.setWorkspaceRoot(new File(component.getWorkDir()));
        context.setEnvironment(env);
       
        container.activateComponent(null,
                                    component.getComponent(),
                                    component.getDescription(),
View Full Code Here

    }
   
    public void register(Component component) throws Exception {
        ComponentNameSpace cns = new ComponentNameSpace(container.getName(), component.getName());
        ComponentContextImpl context = new ComponentContextImpl(container, cns);
        ComponentEnvironment env = new ComponentEnvironment();
        env.setComponentRoot(new File(component.getRootDir()));
        env.setInstallRoot(new File(component.getInstallDir()));
        env.setWorkspaceRoot(new File(component.getWorkDir()));
        context.setEnvironment(env);
       
        container.activateComponent(null,
                                    component.getComponent(),
                                    component.getDescription(),
View Full Code Here

    }

    protected void buildComponent(File componentDirectory) throws DeploymentException {
        try {
            String componentName = componentDirectory.getName();
            ComponentEnvironment env = container.getEnvironmentContext().getComponentEnvironment(componentName);
            if (!env.getStateFile().exists()) {
                // An installer has been created but the component has not been
                // installed
                // So remove it
                FileUtil.deleteFile(componentDirectory);
            } else {
View Full Code Here

TOP

Related Classes of org.apache.servicemix.jbi.container.ComponentEnvironment

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.