DBConstants.DATA_SERVICE_OBJECT).getValue()).getDsLocation(); AxisServiceGroup axisServiceGroup = axisService.getAxisServiceGroup(); axisServiceGroup.addParameter(CarbonConstants.KEEP_SERVICE_HISTORY_PARAM, Boolean.TRUE.toString()); axisServiceGroup.addParameter(CarbonConstants.PRESERVE_SERVICE_HISTORY_PARAM, Boolean.TRUE.toString()); axisService.addParameter(CarbonConstants.KEEP_SERVICE_HISTORY_PARAM, Boolean.TRUE.toString()); axisService.addParameter(CarbonConstants.PRESERVE_SERVICE_HISTORY_PARAM, Boolean.TRUE.toString());
AxisServiceGroup serviceGroup = new AxisServiceGroup(configCtx.getAxisConfiguration()); serviceGroup.addParameter("last.updated", bundle.getLastModified()); ClassLoader loader = new BundleClassLoader(bundle, Registry.class.getClassLoader()); serviceGroup.addParameter(OSGi_BUNDLE_ID, bundle.getBundleId()); axisServiceGroupList.add(serviceGroup);
/** * Adds Synapse Service to Axis2 configuration which enables the main message mediation. * * @throws AxisFault if an error occurs during Axis2 service initialization */ private void deploySynapseService() throws AxisFault { log.info("Deploying the Synapse service..."); // Dynamically initialize the Synapse Service and deploy it into Axis2 AxisConfiguration axisCfg = configurationContext.getAxisConfiguration(); AxisService synapseService = new AxisService(SynapseConstants.SYNAPSE_SERVICE_NAME); AxisOperation mediateOperation = new InOutAxisOperation( SynapseConstants.SYNAPSE_OPERATION_NAME); mediateOperation.setMessageReceiver(new SynapseMessageReceiver()); synapseService.addOperation(mediateOperation); List<String> transports = new ArrayList<String>(); transports.add(Constants.TRANSPORT_HTTP); transports.add(Constants.TRANSPORT_HTTPS); synapseService.setExposedTransports(transports); AxisServiceGroup synapseServiceGroup = new AxisServiceGroup(axisCfg); synapseServiceGroup.setServiceGroupName(SynapseConstants.SYNAPSE_SERVICE_NAME); synapseServiceGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); synapseServiceGroup.addService(synapseService); axisCfg.addServiceGroup(synapseServiceGroup); }
/** * Adds Synapse Service to Axis2 configuration which enables the main message mediation. * * @throws AxisFault if an error occurs during Axis2 service initialization */ private void deploySynapseService() throws AxisFault { log.info("Deploying the Synapse service..."); // Dynamically initialize the Synapse Service and deploy it into Axis2 AxisConfiguration axisCfg = configurationContext.getAxisConfiguration(); AxisService synapseService = new AxisService(SynapseConstants.SYNAPSE_SERVICE_NAME); AxisOperation mediateOperation = new InOutAxisOperation( SynapseConstants.SYNAPSE_OPERATION_NAME); mediateOperation.setMessageReceiver(new SynapseMessageReceiver()); synapseService.addOperation(mediateOperation); List<String> transports = new ArrayList<String>(); transports.add(Constants.TRANSPORT_HTTP); transports.add(Constants.TRANSPORT_HTTPS); synapseService.setExposedTransports(transports); AxisServiceGroup synapseServiceGroup = new AxisServiceGroup(axisCfg); synapseServiceGroup.setServiceGroupName(SynapseConstants.SYNAPSE_SERVICE_NAME); synapseServiceGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); synapseServiceGroup.addService(synapseService); axisCfg.addServiceGroup(synapseServiceGroup); }
private AxisServiceGroup createServiceGroupForService(AxisService svc) throws AxisFault { AxisServiceGroup svcGroup = new AxisServiceGroup(); svcGroup.setServiceGroupName(svc.getName()); svcGroup.addService(svc); // Checking configured using files param is not a good solution. We must figure out a way to handle this // at Carbon persistence manager layer. if (svc.getParameter(CarbonConstants.PRESERVE_SERVICE_HISTORY_PARAM) != null && svc.getParameter(BusinessProcessConstants.CONFIGURED_USING_BPEL_PKG_CONFIG_FILES) == null) { svcGroup.addParameter(new Parameter(CarbonConstants.PRESERVE_SERVICE_HISTORY_PARAM, "true")); } return svcGroup; }
public void setServiceGroupParameter(String serviceGroupId, OMElement parameterElement) throws AxisFault { AxisServiceGroup axisServiceGroup = getAxisConfig().getServiceGroup(serviceGroupId); Parameter parameter = ParameterUtil.createParameter(parameterElement); Parameter p = axisServiceGroup.getParameter(parameter.getName()); ServiceGroupDO serviceGroupDO = pm.getServiceGroup(serviceGroupId); ServiceGroupParameterDO sgParamDO = serviceGroupDO.getParameter(parameter.getName()); if (p != null && sgParamDO != null) { // Setting a new value for a parameter declared in AxisServiceGroup if (!p.isLocked()) { axisServiceGroup.addParameter(parameter); sgParamDO.setValue(parameterElement.toString()); pm.updateEntity(sgParamDO); } } else { // If we are adding a new AxisServiceGroup param or overriding a param in the Configuration hierarchy if (p == null || !p.isLocked()) { axisServiceGroup.addParameter(parameter); sgParamDO = new ServiceGroupParameterDO(); sgParamDO.setName(parameter.getName()); sgParamDO.setValue(parameterElement.toString()); sgParamDO.setServiceGroup(serviceGroupDO); try { pm.addEntity(sgParamDO); } catch (DuplicateEntityException e) { log.error("Service Parameter already exists", e); } } } }
axisServiceGroup.addParameter(new Parameter(SPRING_APPLICATION_CONTEXT, appContext)); } else {
axisServiceGroup.addParameter(new Parameter(SPRING_APPLICATION_CONTEXT, appContext)); } else {
Parameter parameter = ParameterUtil .createParameter(Constants.Configuration.ENABLE_MTOM, flag.trim()); serviceGroup.addParameter(parameter);
AxisServiceGroup axisAnonSvcGroup = new AxisServiceGroup(axisCfg); axisAnonSvcGroup.setServiceGroupName(serviceKey); axisAnonSvcGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); axisAnonymousService.setClientSide(true); axisAnonSvcGroup.addService(axisAnonymousService);
AxisServiceGroup axisAnonSvcGroup = new AxisServiceGroup(axisCfg); axisAnonSvcGroup.setServiceGroupName(serviceKey); axisAnonSvcGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); axisAnonymousService.setClientSide(true); axisAnonSvcGroup.addService(axisAnonymousService);
AxisServiceGroup axisAnonSvcGroup = new AxisServiceGroup(axisCfg); axisAnonSvcGroup.setServiceGroupName(serviceKey); axisAnonSvcGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); axisAnonymousService.setClientSide(true); axisAnonSvcGroup.addService(axisAnonymousService);
AxisServiceGroup axisAnonSvcGroup = new AxisServiceGroup(axisCfg); axisAnonSvcGroup.setServiceGroupName(serviceKey); axisAnonSvcGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); axisAnonymousService.setClientSide(true); axisAnonSvcGroup.addService(axisAnonymousService);