Package org.apache.axis2.deployment

Examples of org.apache.axis2.deployment.DeploymentEngine


     * @param synapseEnvironment SynapseEnvironment to which this deployer belongs
     */
    private void registerDeployer(AxisConfiguration axisConfig,
                                  SynapseEnvironment synapseEnvironment) {
        SynapseConfiguration synCfg = synapseEnvironment.getSynapseConfiguration();
        DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig.getConfigurator();
        SynapseArtifactDeploymentStore deploymentStore = synCfg.getArtifactDeploymentStore();

        String synapseConfigPath = ServiceBusUtils.getSynapseConfigAbsPath(
                synapseEnvironment.getServerContextInformation());
        String endpointDirPath = synapseConfigPath
                + File.separator + MultiXMLConfigurationBuilder.EXECUTORS_DIR;

        for (PriorityExecutor ep : synCfg.getPriorityExecutors().values()) {
            if (ep.getFileName() != null) {
                deploymentStore.addRestoredArtifact(
                        endpointDirPath + File.separator + ep.getFileName());
            }
        }
        deploymentEngine.addDeployer(
                new ExecutorDeployer(), endpointDirPath, ServiceBusConstants.ARTIFACT_EXTENSION);
    }
View Full Code Here


        }
    }

    private void addDeployers(ConfigurationContext configurationContext) {
        AxisConfiguration axisConfig = configurationContext.getAxisConfiguration();
        DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig.getConfigurator();
        String carbonRepoPath = configurationContext.getAxisConfiguration().getRepository().getFile();


        String mediatorsPath = carbonRepoPath + File.separator + "mediators";
        String extensionsPath = carbonRepoPath + File.separator + "extensions";
        ExtensionDeployer deployer = new ExtensionDeployer();
        deploymentEngine.addDeployer(deployer, mediatorsPath, "xar");
        deploymentEngine.addDeployer(deployer, extensionsPath, "xar");
        deploymentEngine.addDeployer(deployer, mediatorsPath, "jar");
        deploymentEngine.addDeployer(deployer, extensionsPath, "jar");
    }
View Full Code Here

     * @param axisConfig         AxisConfiguration to which this deployer belongs
     * @param synapseEnvironment SynapseEnvironment to which this deployer belongs
     */
    private void unregisterDeployer(AxisConfiguration axisConfig, SynapseEnvironment synapseEnvironment) {
        if (axisConfig != null) {
            DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig.getConfigurator();
            String synapseConfigPath = ServiceBusUtils.getSynapseConfigAbsPath(
                    synapseEnvironment.getServerContextInformation());
            String templatesDirPath = synapseConfigPath
                    + File.separator + MultiXMLConfigurationBuilder.TEMPLATES_DIR;
            deploymentEngine.removeDeployer(
                    templatesDirPath, ServiceBusConstants.ARTIFACT_EXTENSION);
        }
    }
View Full Code Here

     * @param synapseEnvironment SynapseEnvironment to which this deployer belongs
     */
    private void registerDeployer(AxisConfiguration axisConfig, SynapseEnvironment synapseEnvironment)
            throws AxisFault {
        SynapseConfiguration synCfg = synapseEnvironment.getSynapseConfiguration();
        DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig.getConfigurator();
        SynapseArtifactDeploymentStore deploymentStore = synCfg.getArtifactDeploymentStore();

        String synapseConfigPath = ServiceBusUtils.getSynapseConfigAbsPath(
                synapseEnvironment.getServerContextInformation());
        String templateDirPath = synapseConfigPath
                + File.separator + MultiXMLConfigurationBuilder.TEMPLATES_DIR;

        for (TemplateMediator seqTempl : synCfg.getSequenceTemplates().values()) {
            if (seqTempl.getFileName() != null) {
                deploymentStore.addRestoredArtifact(
                        templateDirPath + File.separator + seqTempl.getFileName());
            }
        }

        for (Template epTempl : synCfg.getEndpointTemplates().values()) {
            if (epTempl.getFileName() != null) {
                deploymentStore.addRestoredArtifact(
                        templateDirPath + File.separator + epTempl.getFileName());
            }
        }
        deploymentEngine.addDeployer(new TemplateDeployer(),
                templateDirPath, ServiceBusConstants.ARTIFACT_EXTENSION);
    }
View Full Code Here

                     ServerContextInformation serverContextInformation) {
       
        Object context = serverContextInformation.getServerContext();
        if (context instanceof ConfigurationContext) {
            AxisConfiguration axisCfg = ((ConfigurationContext) context).getAxisConfiguration();
            DeploymentEngine deploymentEngine = (DeploymentEngine) axisCfg.getConfigurator();
            // File carbonHome = new File(System.getProperty(ServerConstants.CARBON_HOME));
            // subjected to change
            String carbonRepoPath = axisCfg.getRepository().getPath();
            String mediatorsPath = carbonRepoPath + File.separator + "mediators";
            String extensionsPath = carbonRepoPath + File.separator + "extensions";
            ExtensionDeployer deployer = new ExtensionDeployer();
            deploymentEngine.addDeployer(deployer, mediatorsPath, "xar");
            deploymentEngine.addDeployer(deployer, extensionsPath, "xar");
            deploymentEngine.addDeployer(deployer, mediatorsPath, "jar");
            deploymentEngine.addDeployer(deployer, extensionsPath, "jar");

            this.currentConfigurationName = ((ConfigurationContext) context).
                    getAxisConfiguration().getParameterValue(
                    ServiceBusConstants.SYNAPSE_CURRENT_CONFIGURATION).toString();
View Full Code Here

        } while (isDeploymentSchedulerRunning);
        log.info("All deployment tasks have been completed.");
    }

    private boolean isDeploymentSchedulerRunning(ConfigurationContext configurationContext) {
        DeploymentEngine deploymentEngine =
                (DeploymentEngine) configurationContext.getAxisConfiguration().getConfigurator();
        return deploymentEngine.isDeploymentTaskRunning();
    }
View Full Code Here

     * @param synapseEnvironment SynapseEnvironment to which this deployer belongs
     */
    private void unregisterDeployer(AxisConfiguration axisConfig, SynapseEnvironment synapseEnvironment)
            throws TenantAwareLoadBalanceEndpointException {
        if (axisConfig != null) {
            DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig.getConfigurator();
            String synapseConfigPath = ServiceBusUtils.getSynapseConfigAbsPath(
                    synapseEnvironment.getServerContextInformation());
            String endpointDirPath = synapseConfigPath
                    + File.separator + MultiXMLConfigurationBuilder.ENDPOINTS_DIR;
            deploymentEngine.removeDeployer(
                    endpointDirPath, ServiceBusConstants.ARTIFACT_EXTENSION);
        }
    }
View Full Code Here

     * @param synapseEnvironment SynapseEnvironment to which this deployer belongs
     */
    private void registerDeployer(AxisConfiguration axisConfig, SynapseEnvironment synapseEnvironment)
            throws TenantAwareLoadBalanceEndpointException {
        SynapseConfiguration synCfg = synapseEnvironment.getSynapseConfiguration();
        DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig.getConfigurator();
        SynapseArtifactDeploymentStore deploymentStore = synCfg.getArtifactDeploymentStore();

        String synapseConfigPath = ServiceBusUtils.getSynapseConfigAbsPath(
                synapseEnvironment.getServerContextInformation());
        String endpointDirPath = synapseConfigPath
                + File.separator + MultiXMLConfigurationBuilder.ENDPOINTS_DIR;

        for (Endpoint ep : synCfg.getDefinedEndpoints().values()) {
            if (ep.getFileName() != null) {
                deploymentStore.addRestoredArtifact(
                        endpointDirPath + File.separator + ep.getFileName());
            }
        }
        deploymentEngine.addDeployer(
                new EndpointDeployer(), endpointDirPath, ServiceBusConstants.ARTIFACT_EXTENSION);
    }
View Full Code Here

     * @param axisConfig AxisConfiguration to which this deployer belongs
     * @param synapseEnvironment SynapseEnvironment to which this deployer belongs
     */
    private void unregisterDeployer(AxisConfiguration axisConfig, SynapseEnvironment synapseEnvironment)
            throws LocalEntryAdminException {
        DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig.getConfigurator();
        String synapseConfigPath = ServiceBusUtils.getSynapseConfigAbsPath(
                synapseEnvironment.getServerContextInformation());
        String entriesDirPath = synapseConfigPath
                + File.separator + MultiXMLConfigurationBuilder.LOCAL_ENTRY_DIR;
        deploymentEngine.removeDeployer(
                entriesDirPath, ServiceBusConstants.ARTIFACT_EXTENSION);
    }
View Full Code Here

     * @param synapseEnvironment SynapseEnvironment to which this deployer belongs
     */
    private void registerDeployer(AxisConfiguration axisConfig, SynapseEnvironment synapseEnvironment)
            throws LocalEntryAdminException {
        SynapseConfiguration synCfg = synapseEnvironment.getSynapseConfiguration();
        DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig.getConfigurator();
        SynapseArtifactDeploymentStore deploymentStore = synCfg.getArtifactDeploymentStore();

        String synapseConfigPath = ServiceBusUtils.getSynapseConfigAbsPath(
                synapseEnvironment.getServerContextInformation());
        String entriesDirPath = synapseConfigPath
                + File.separator + MultiXMLConfigurationBuilder.LOCAL_ENTRY_DIR;

        for (Entry entry : synCfg.getDefinedEntries().values()) {
            if (entry.getFileName() != null) {
                deploymentStore.addRestoredArtifact(
                        entriesDirPath + File.separator + entry.getFileName());
            }
        }
        deploymentEngine.addDeployer(new LocalEntryDeployer(),
                entriesDirPath, ServiceBusConstants.ARTIFACT_EXTENSION);
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.deployment.DeploymentEngine

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.