Examples of AxisModule


Examples of org.apache.axis2.description.AxisModule

     *         with caching and else <code>false</code>
     * @throws CachingComponentException if retrieving of the availability of caching is unsuccessful
     */
    public boolean isCachingEnabledForService(String serviceName) throws CachingComponentException {
        AxisService service = retrieveAxisService(serviceName);
        AxisModule module = axisConfig.getModule(CachingComponentConstants.CACHING_MODULE);
        return service.isEngaged(module);
    }
View Full Code Here

Examples of org.apache.axis2.description.AxisModule

     */
    public boolean isCachingEnabledForOperation(String serviceName, String operationName)
            throws CachingComponentException {
        AxisService service = retrieveAxisService(serviceName);
        AxisOperation operation = service.getOperation(new QName(operationName));
        AxisModule module = axisConfig.getModule(CachingComponentConstants.CACHING_MODULE);
        return operation.isEngaged(module) || service.isEngaged(module);
    }
View Full Code Here

Examples of org.apache.axis2.description.AxisModule

        return operation.isEngaged(module) || service.isEngaged(module);
    }


    public boolean isCachingGloballyEnabled() throws CachingComponentException {
        AxisModule module = axisConfig.getModule(CachingComponentConstants.CACHING_MODULE);
        Parameter param = module.getParameter(GLOBALLY_ENGAGED_PARAM_NAME);
        if (param != null) {
            String globallyEngaged = (String) param.getValue();
            if (globallyEngaged != null && globallyEngaged.length() != 0) {
                return Boolean.parseBoolean(globallyEngaged.trim());
            }
View Full Code Here

Examples of org.apache.axis2.description.AxisModule

        dataHolder.setConfigContext(contextService.getServerConfigContext());
    }

    protected void unsetConfigurationContextService(ConfigurationContextService contextService) {
        AxisConfiguration axisConf = configContext.getAxisConfiguration();
        AxisModule statModule = axisConf.getModule(ServerAdminServiceComponent.SERVER_ADMIN_MODULE_NAME);
        if (statModule != null) {
            try {
                axisConf.disengageModule(statModule);
            } catch (AxisFault axisFault) {
                log.error("Failed disengage module: " + ServerAdminServiceComponent.SERVER_ADMIN_MODULE_NAME);
View Full Code Here

Examples of org.apache.axis2.description.AxisModule

        if (service == null) {
            log.error("Service  " + serviceName + "cannnot be found!");
            throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.SERVICE_NOT_FOUND);
        }

        AxisModule module = axisConfig.getModule(moduleId);
        if (module == null) {
            log.error("Module " + moduleId + " cannnot be found!");
            throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.MODULE_NOT_FOUND);
        }

        if (axisConfig.isEngaged(module)) {
            throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.ALREADY_ENGAGED_GLOBALLY);
        }

        AxisServiceGroup axisServiceGroup = service.getAxisServiceGroup();
        if (axisServiceGroup.isEngaged(module)) {
            // Module is already engaged so just return the value;
            throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.ALREADY_ENGAGED_SERVICE_GROUP);
        }

        if (service.isEngaged(module)) {
            // Module is already engaged so just return the value;
            throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.ALREADY_ENGAGED_SERVICE);
        }

        try {
            if (RAHAS_MODULE_NAME.equalsIgnoreCase(module.getName())) {
                AxisModule rampartModule = axisConfig.getModule(RAMPART_MODULE_NAME);
                if (rampartModule == null) {
                    throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.RAHAS_RAMPART_NOT_FOUND);
                }
                if (!service.isEngaged(rampartModule)) {
                    pf.getServicePM().engageModuleForService(rampartModule, service);
View Full Code Here

Examples of org.apache.axis2.description.AxisModule

        if (service == null) {
            log.error("Service  " + serviceName + "cannnot be found!");
            throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.SERVICE_NOT_FOUND);
        }

        AxisModule module = axisConfig.getModule(moduleId);
        if (module == null) {
            log.error("Module " + moduleId + " cannnot be found!");
            throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.MODULE_NOT_FOUND);
        }

        if (service.isEngaged(module)) {
            if (RAMPART_MODULE_NAME.equalsIgnoreCase(module.getName())) {
                // Check whether it is possible to disengage Rampart
                AxisModule rahasModule = axisConfig.getModule(RAHAS_MODULE_NAME);
                if (service.isEngaged(rahasModule)) {
                    throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.RAHAS_RAMPART_DISENGAGE);
                }
            }
View Full Code Here

Examples of org.apache.axis2.description.AxisModule

        if (operation == null) {
            log.error("Operation  " + operationName + "cannnot be found!");
            throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.OPERATION_NOT_FOUND);
        }

        AxisModule module = axisConfig.getModule(moduleId);
        if (module == null) {
            log.error("Module  " + moduleId + "cannnot be found!");
            throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.OPERATION_NOT_FOUND);
        }

        if (axisConfig.isEngaged(module)) {
            throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.ALREADY_ENGAGED_GLOBALLY);
        }

        AxisServiceGroup axisServiceGroup = service.getAxisServiceGroup();
        if (axisServiceGroup.isEngaged(module)) {
            // Module is already engaged so just return the value;
            throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.ALREADY_ENGAGED_SERVICE_GROUP);
        }

        if (service.isEngaged(module)) {
            // Module is already engaged so just return the value;
            throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.ALREADY_ENGAGED_SERVICE);
        }

        if (operation.isEngaged(module)) {
            // Module is already engaged so just return the value;
            throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.ALREADY_ENGAGED_OPERATION);
        }

        try {
            if (RAHAS_MODULE_NAME.equalsIgnoreCase(module.getName())) {
                AxisModule rampartModule = axisConfig.getModule(RAMPART_MODULE_NAME);
                if (rampartModule == null) {
                    throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.RAHAS_RAMPART_NOT_FOUND);
                }
                if (!operation.isEngaged(rampartModule)) {
                    pf.getOperationPM().engageModuleForOperation(rampartModule, operation);
View Full Code Here

Examples of org.apache.axis2.description.AxisModule

        this.configContext = contextService.getServerConfigContext();
    }

    protected void unsetConfigurationContextService(ConfigurationContextService contextService) {
        AxisConfiguration axisConf = configContext.getAxisConfiguration();
        AxisModule statModule = axisConf.getModule(StatisticsConstants.STATISTISTICS_MODULE_NAME);
        if (statModule != null) {
            try {
                axisConf.disengageModule(statModule);
            } catch (AxisFault axisFault) {
                log.error("Failed disengage module: " + StatisticsConstants.STATISTISTICS_MODULE_NAME);
View Full Code Here

Examples of org.apache.axis2.description.AxisModule

        if (operation == null) {
            log.error("Operation  " + operationName + "cannnot be found!");
            throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.OPERATION_NOT_FOUND);
        }

        AxisModule module = axisConfig.getModule(moduleId);
        if (module == null) {
            log.error("Module  " + moduleId + "cannnot be found!");
            throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.OPERATION_NOT_FOUND);
        }

        if (operation.isEngaged(module)) {
            if (RAMPART_MODULE_NAME.equalsIgnoreCase(module.getName())) {
                // Check whether it is possible to disengage Rampart
                AxisModule rahasModule = axisConfig.getModule(RAHAS_MODULE_NAME);
                if (operation.isEngaged(rahasModule)) {
                    throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.RAHAS_RAMPART_DISENGAGE);
                }
            }
View Full Code Here

Examples of org.apache.axis2.description.AxisModule

        if (moduleId.startsWith("addressing")) {
            throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.DISENGAGE_ADDRESSING_GLOBALLY);
        }

        AxisModule module = axisConfig.getModule(moduleId);
        if (module == null) {
            log.error("Module  " + moduleId + "cannnot be found!");
            throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.MODULE_NOT_FOUND);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.