/** * Returns the EngineContext in which the parent ServiceContext lives. * * @return Returns parent ServiceContext's parent EngineContext. */ public ConfigurationContext getConfigurationContext() { if (parent != null) { return ((ServiceContext) parent).getConfigurationContext(); } else { return null; } }
/** * Returns the EngineContext in which the parent ServiceContext lives. * * @return Returns parent ServiceContext's parent EngineContext. */ public ConfigurationContext getConfigurationContext() { if (parent != null) { return ((ServiceContext) parent).getConfigurationContext(); } else { return null; } }
public ConfigurationContext getConfigurationContext(){ return serviceContext.getConfigurationContext(); }
public void init(ServiceContext context) throws AxisFault { this.storage = (MsgBoxStorage) context.getConfigurationContext().getProperty( MsgBoxCommonConstants.MSGBOX_STORAGE); logger.debug("Starting cleanup thread for Message Box..."); deletingThread = new Thread(new DeleteOldMessageRunnable(context.getConfigurationContext().getProperty(ConfigKeys.MSG_PRESV_INTERVAL))); deletingThread.start(); }
public void init(ServiceContext serviceContext) { this.setConfigContext(serviceContext.getConfigurationContext()); this.setAxisConfig(serviceContext.getConfigurationContext() .getAxisConfiguration()); }
public void init(ServiceContext context) throws AxisFault { this.storage = (MsgBoxStorage) context.getConfigurationContext().getProperty( MsgBoxCommonConstants.MSGBOX_STORAGE); logger.info("Start clean up thread for messagebox"); deletingThread = new Thread(new DeleteOldMessageRunnable()); deletingThread.start(); }
public ConfigurationContext getConfigurationContext() { return activityAdminServiceStub._getServiceClient().getServiceContext().getConfigurationContext(); } }
public ConfigurationContext getConfigurationContext() { return activityAdminServiceStub._getServiceClient().getServiceContext().getConfigurationContext(); } }
public ConfigurationContext getConfigurationContext() { return activityAdminServiceStub._getServiceClient().getServiceContext().getConfigurationContext(); } }
public ConfigurationContext getConfigurationContext() { return activityAdminServiceStub._getServiceClient().getServiceContext().getConfigurationContext(); } }
/** * Removes the pointers to this <code>OperationContext</code> in the * <code>ConfigurationContext</code>'s OperationContextMap so that this * <code>OperationContext</code> will eventually get garbage collected * along with the <code>MessageContext</code>'s it contains. Note that if * the caller wants to make sure its safe to clean up this OperationContext * he should call isComplete() first. However, in cases like IN_OPTIONAL_OUT * and OUT_OPTIONAL_IN, it is possibe this will get called without the MEP * being complete due to the optional nature of the MEP. */ public void cleanup() { ServiceContext serv = getServiceContext(); if (serv != null) { serv.getConfigurationContext().unregisterOperationContext(key); } }
/** * Removes the pointers to this <code>OperationContext</code> in the * <code>ConfigurationContext</code>'s OperationContextMap so that this * <code>OperationContext</code> will eventually get garbage collected * along with the <code>MessageContext</code>'s it contains. Note that if * the caller wants to make sure its safe to clean up this OperationContext * he should call isComplete() first. However, in cases like IN_OPTIONAL_OUT * and OUT_OPTIONAL_IN, it is possibe this will get called without the MEP * being complete due to the optional nature of the MEP. */ public void cleanup() { ServiceContext serv = getServiceContext(); if (serv != null) { serv.getConfigurationContext().unregisterOperationContext(key); } }
/** * Constructor that takes in a configContext * @param configurationContext configurationContext * @param targetEndpoint targetEndpoint * @throws org.apache.axis2.AxisFault in case of error */ public IMAGEPROXYStub(org.apache.axis2.context.ConfigurationContext configurationContext, java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault { // To populate AxisService populateAxisService(); populateFaults(); _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext, _service); configurationContext = _serviceClient.getServiceContext().getConfigurationContext(); _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference(targetEndpoint)); }
/** * Constructor that takes in a configContext and useseperate listner */ public GlobalAdminServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext, java.lang.String targetEndpoint, boolean useSeparateListener) throws org.apache.axis2.AxisFault { //To populate AxisService populateAxisService(); populateFaults(); _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,_service); configurationContext = _serviceClient.getServiceContext().getConfigurationContext(); _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference( targetEndpoint)); _serviceClient.getOptions().setUseSeparateListener(useSeparateListener); //Set the soap version _serviceClient.getOptions().setSoapVersionURI(org.apache.axiom.soap.SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); }
/** Constructor that takes in a configContext @param configurationContext configurationContext @param targetEndpoint targetEndpoint @throws org.apache.axis2.AxisFault in case of error */ public ActorServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext, java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault { //To populate AxisService populateAxisService(); populateFaults(); _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,_service); configurationContext = _serviceClient.getServiceContext().getConfigurationContext(); _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference( targetEndpoint)); _serviceClient.getOptions().setTimeOutInMilliSeconds(1000000000); } /**
/** Constructor that takes in a configContext @param configurationContext configurationContext @param targetEndpoint targetEndpoint @throws org.apache.axis2.AxisFault in case of error */ public AuthorityServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext, java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault { //To populate AxisService populateAxisService(); populateFaults(); _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,_service); configurationContext = _serviceClient.getServiceContext().getConfigurationContext(); _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference( targetEndpoint)); _serviceClient.getOptions().setTimeOutInMilliSeconds(1000000000); } /**
public void stop() { if (serviceClient != null) { // close all connections that we have initiated, so that the jetty server // can be restarted without seeing ConnectExceptions HttpClient httpClient = (HttpClient)serviceClient.getServiceContext().getConfigurationContext() .getProperty(HTTPConstants.CACHED_HTTP_CLIENT); if (httpClient != null) ((MultiThreadedHttpConnectionManager)httpClient.getHttpConnectionManager()).shutdown(); serviceClient = null; } }
/** * Users can get a SequenceReport of the sequence defined by the information * given from the passed serviceClient object. * * @param serviceClient * @return * @throws SandeshaException */ public static SequenceReport getOutgoingSequenceReport(ServiceClient serviceClient) throws SandeshaException { ServiceContext serviceContext = serviceClient.getServiceContext(); if (serviceContext == null) throw new SandeshaException(SandeshaMessageHelper.getMessage( SandeshaMessageKeys.serviceContextNotSet)); ConfigurationContext configurationContext = serviceContext.getConfigurationContext(); String internalSequenceID = getInternalSequenceIdFromServiceClient(serviceClient); return getOutgoingSequenceReport(internalSequenceID, configurationContext); }
/** * Constructor that takes in a configContext and useseperate listner */ public WorkflowInterpretorStub(org.apache.axis2.context.ConfigurationContext configurationContext, java.lang.String targetEndpoint, boolean useSeparateListener) throws org.apache.axis2.AxisFault { // To populate AxisService populateAxisService(); populateFaults(); MultiThreadedHttpConnectionManager httpConnectionManager = new MultiThreadedHttpConnectionManager(); httpConnectionManager.getParams().setMaxTotalConnections(10000); httpConnectionManager.getParams().setMaxConnectionsPerHost(HostConfiguration.ANY_HOST_CONFIGURATION, 100); httpConnectionManager.getParams().setDefaultMaxConnectionsPerHost(200); HttpClient httpClient = new HttpClient(httpConnectionManager); _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext, _service); configurationContext = _serviceClient.getServiceContext().getConfigurationContext(); configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, true); configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient); configurationContext.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION, true); _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference(targetEndpoint)); _serviceClient.getOptions().setUseSeparateListener(useSeparateListener); }
void setMaxConnections() { MultiThreadedHttpConnectionManager multiThreadedHttpConnectionManager = new MultiThreadedHttpConnectionManager(); HttpConnectionManagerParams params = new HttpConnectionManagerParams(); params.setDefaultMaxConnectionsPerHost(50); params.setMaxTotalConnections(50); params.setSoTimeout(20000); params.setConnectionTimeout(20000); multiThreadedHttpConnectionManager.setParams(params); HttpClient httpClient = new HttpClient(multiThreadedHttpConnectionManager); serviceClient.getServiceContext().getConfigurationContext().setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient); }