Author: rareddy
Date: 2012-07-30 17:31:32 -0400 (Mon, 30 Jul 2012)
New Revision: 4277
Modified:
trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSConnectionImpl.java
trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSManagedConnectionFactory.java
trunk/connectors/connector-ws/src/main/rar/META-INF/ra.xml
Log:
TEIID-1714: adding a configuration property for timeout
Modified:
trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSConnectionImpl.java
===================================================================
---
trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSConnectionImpl.java 2012-07-30
16:04:34 UTC (rev 4276)
+++
trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSConnectionImpl.java 2012-07-30
21:31:32 UTC (rev 4277)
@@ -276,6 +276,10 @@
dispatch.getRequestContext().put(Dispatch.PASSWORD_PROPERTY, mcf.getAuthPassword());
}
+ if (mcf.getRequestTimeout() != -1L){
+ dispatch.getRequestContext().put("javax.xml.ws.client.receiveTimeout",
mcf.getRequestTimeout()); //$NON-NLS-1$
+ }
+
if (HTTPBinding.HTTP_BINDING.equals(binding)) {
Map<String, List<String>> httpHeaders = (Map<String,
List<String>>)dispatch.getRequestContext().get(MessageContext.HTTP_REQUEST_HEADERS);
if(httpHeaders == null) {
Modified:
trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSManagedConnectionFactory.java
===================================================================
---
trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSManagedConnectionFactory.java 2012-07-30
16:04:34 UTC (rev 4276)
+++
trunk/connectors/connector-ws/src/main/java/org/teiid/resource/adapter/ws/WSManagedConnectionFactory.java 2012-07-30
21:31:32 UTC (rev 4277)
@@ -54,6 +54,7 @@
private Bus bus;
private QName portQName;
private List<? extends Interceptor> outInterceptors;
+ private Long requestTimeout = -1L;
@SuppressWarnings("serial")
@Override
@@ -102,6 +103,14 @@
public void setEndPoint(String endPoint) {
this.endPoint = endPoint;
+ }
+
+ public Long getRequestTimeout() {
+ return this.requestTimeout;
+ }
+
+ public void setRequestTimeout(Long timeout) {
+ this.requestTimeout = timeout;
}
public SecurityType getAsSecurityType() {
Modified: trunk/connectors/connector-ws/src/main/rar/META-INF/ra.xml
===================================================================
--- trunk/connectors/connector-ws/src/main/rar/META-INF/ra.xml 2012-07-30 16:04:34 UTC
(rev 4276)
+++ trunk/connectors/connector-ws/src/main/rar/META-INF/ra.xml 2012-07-30 21:31:32 UTC
(rev 4277)
@@ -76,6 +76,12 @@
<config-property-name>ConfigName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
+
+ <config-property>
+ <description>{$display:"Request
Timeout",$description:"Timeout for request"}</description>
+ <config-property-name>EndPoint</config-property-name>
+ <config-property-type>java.lang.Long</config-property-type>
+ </config-property>
<connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
<connectionfactory-impl-class>org.teiid.resource.spi.WrappedConnectionFactory</connectionfactory-impl-class>
Show replies by date