Showing posts with label CONNECT_TIMEOUT. Show all posts
Showing posts with label CONNECT_TIMEOUT. Show all posts

Friday, 31 July 2015

Setting timeout for for JAX-WS Webservice clients generated from clientgen

Setting timeout for for JAX-WS Webservice clients generated from clientgen

Use below options:

import javax.xml.ws.BindingProvider;
import javax.xml.ws.handler.MessageContext;
import com.sun.xml.ws.developer.JAXWSProperties;
import com.sun.xml.ws.client.BindingProviderProperties;
/*
The following classes are inside

import com.sun.xml.ws.developer.JAXWSProperties;
import com.sun.xml.ws.client.BindingProviderProperties;

%WLSINSTALLATION%\modules\glassfish.jaxws.rt_1.1.0.0_2-1-4.jar
*/
Map requestContext = ((BindingProvider)port).getRequestContext();
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost.com/<webservice>");
requestContext.put(JAXWSProperties.CONNECT_TIMEOUT, 300);
requestContext.put(BindingProviderProperties.REQUEST_TIMEOUT, 300); 


Also see

Setting Timeout for Weblogic Webservice Client and for all clients

Setting timeout for for JAX-RPC Webservice clients generated from clientgen


Sunday, 5 January 2014

Comparing oracle.net.CONNECT_TIMEOUT and JDBC statement-timeout values for SOA 11g default datasources.

Comparing oracle.net.CONNECT_TIMEOUT and JDBC statement-timeout values for SOA 11g default datasources.

Default Data Sources that can be checked in Weblogic console:

SOA
SOA Local TX
EDN
EDN Local TX
mds-soa
mds-owsm

Under $DOMAIN_HOME>/config/jdbc

Check the specific configuration files:

mds-soa-jdbc.xml
mds-owsm-jdbc.xml
SOADataSource-jdbc.xml
SOALocalTxDataSource-jdbc.xml
EDNDataSource-jdbc.xml
EDNLocalTxDataSource-jdbc.xml


In each file look for entries like below:

<property>
        <name>oracle.net.CONNECT_TIMEOUT</name>
        <value>10000</value>
</property>

and

<statement-timeout>60</statement-timeout>

It is recommended to set both the properties and that statement-timeout value exceeds that of CONNECT_TIMEOUT. Both the properties can be set in Weblogic Console in Data Source configuration area.

Setting these properties ensures you do not end up with stuck threads in runtime or a hung server requiring restart.