Package org.apache.axis2.deployment

Examples of org.apache.axis2.deployment.DeploymentEngine


        }
    }

    private void registerDeployer(AxisConfiguration axisConfig, SynapseEnvironment synEnv)
            throws ProxyAdminException {
        DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig.getConfigurator();
        SynapseArtifactDeploymentStore deploymentStore =
                synEnv.getSynapseConfiguration().getArtifactDeploymentStore();

        String synapseConfigPath = ServiceBusUtils.getSynapseConfigAbsPath(
                synEnv.getServerContextInformation());

        String proxyDirPath = synapseConfigPath
                + File.separator + MultiXMLConfigurationBuilder.PROXY_SERVICES_DIR;

        for (ProxyService proxyService : synEnv.getSynapseConfiguration().getProxyServices()) {
            if (proxyService.getFileName() != null) {
                deploymentStore.addRestoredArtifact(
                        proxyDirPath + File.separator + proxyService.getFileName());
            }
        }
        deploymentEngine.addDeployer(
                new ProxyServiceDeployer(), proxyDirPath, 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 unregistryDeployer(AxisConfiguration axisConfig,
                                    SynapseEnvironment synapseEnvironment) {
        DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig.getConfigurator();
        String synapseConfigPath = ServiceBusUtils.getSynapseConfigAbsPath(
                synapseEnvironment.getServerContextInformation());
        String proxyDirPath = synapseConfigPath
                + File.separator + MultiXMLConfigurationBuilder.PROXY_SERVICES_DIR;
        deploymentEngine.removeDeployer(
                proxyDirPath, ServiceBusConstants.ARTIFACT_EXTENSION);
    }
View Full Code Here

    public ModuleDescription loadModulefromResources(String moduleName) throws AxisFault {
        ModuleDescription module;
        // trying to read from resources
        File file = new ArchiveReader().creatModuleArchivefromResource(moduleName,
                getRepository());
        module = new DeploymentEngine().buildModule(file, this);
        if (module != null) {
            // since it is a new module
            addModule(module);
        }
        return module;
View Full Code Here

    }

    public static ServiceContext createAdressedEnabledClientSide(
            ServiceDescription service)
            throws AxisFault {
        DeploymentEngine deploymentEngine = new DeploymentEngine();
        File file = new File(
                org.apache.axis2.Constants.TESTING_REPOSITORY +
                        "/modules/addressing.mar");
        TestCase.assertTrue(file.exists());
        ModuleDescription moduleDesc = deploymentEngine.buildModule(file);

        ConfigurationContextFactory efac = new ConfigurationContextFactory();
        ConfigurationContext sysContext =
                efac.buildClientConfigurationContext("target/test-resources/intregrationRepo");
View Full Code Here

    }

    public static ServiceContext createAdressedEnabledClientSide(
            ServiceDescription service, String clientHome)
            throws AxisFault {
        DeploymentEngine deploymentEngine = new DeploymentEngine();
        File file = new File(
                org.apache.axis2.Constants.TESTING_REPOSITORY +
                        "/modules/addressing.mar");
        TestCase.assertTrue(file.exists());
        ModuleDescription moduleDesc = deploymentEngine.buildModule(file);

        ConfigurationContextFactory efac = new ConfigurationContextFactory();
        ConfigurationContext sysContext =
                efac.buildClientConfigurationContext(clientHome);
View Full Code Here

    public ConfigurationContext buildConfigurationContext(
            String repositoryName)
            throws DeploymentException {
        ConfigurationContext configurationContext = null;
        try {
            DeploymentEngine deploymentEngine =
                    new DeploymentEngine(repositoryName);
            AxisConfiguration configuration = deploymentEngine.load();
            PhaseResolver phaseResolver = new PhaseResolver(configuration);

            Parameter parameter = configuration.getParameter("seralizeLocation");
            String serailzeLocaion = ".";
            if (parameter !=null) {
View Full Code Here

            String axis2home)
            throws DeploymentException {
        ConfigurationContext engineContext = null;
        try {
            AxisConfiguration configuration =
                    new DeploymentEngine().loadClient(axis2home);
            PhaseResolver phaseResolver = new PhaseResolver(configuration);

            File objFile = new File("./Axis2.obj");
            if(objFile.exists()){
                try {
View Full Code Here

        boolean isNewmodule = false;
        boolean tobeEnaged = true;
        if (module == null) {
            File file = new ArchiveReader().creatModuleArchivefromResource(
                    moduleref.getLocalPart(), getRepository());
            module = new DeploymentEngine().buildModule(file);
            isNewmodule = true;
        }
        if (module != null) {
            for (Iterator iterator = engagedModules.iterator();
                 iterator.hasNext();) {
View Full Code Here

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

    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

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.