You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mi...@apache.org on 2008/11/26 20:39:29 UTC

svn commit: r720961 - /ode/trunk/axis2/src/main/java/org/apache/ode/axis2/Properties.java

Author: midon
Date: Wed Nov 26 11:39:29 2008
New Revision: 720961

URL: http://svn.apache.org/viewvc?rev=720961&view=rev
Log:
ODE-440 add JMS replyTo and timeout properties

Modified:
    ode/trunk/axis2/src/main/java/org/apache/ode/axis2/Properties.java

Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/Properties.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/Properties.java?rev=720961&r1=720960&r2=720961&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/Properties.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/Properties.java Wed Nov 26 11:39:29 2008
@@ -23,6 +23,7 @@
 import org.apache.axis2.client.Options;
 import org.apache.axis2.transport.http.HTTPConstants;
 import org.apache.axis2.transport.http.HttpTransportProperties;
+import org.apache.axis2.transport.jms.JMSConstants;
 import org.apache.commons.httpclient.Header;
 import org.apache.commons.httpclient.HttpVersion;
 import org.apache.commons.httpclient.ProtocolException;
@@ -73,6 +74,8 @@
     public static final String PROP_HTTP_REQUEST_GZIP = "http.request.gzip";
     public static final String PROP_HTTP_ACCEPT_GZIP = "http.accept.gzip";
     public static final String PROP_SECURITY_POLICY = "security.policy";
+    public static final String PROP_JMS_REPLY_DESTINATION = "jms.reply.destination";
+    public static final String PROP_JMS_REPLY_TIMEOUT = "jms.reply.timeout";
 
 
     protected static final Log log = LogFactory.getLog(Properties.class);
@@ -134,7 +137,7 @@
                     options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, Integer.valueOf(value));
                 } catch (NumberFormatException e) {
                     if (log.isWarnEnabled())
-                        log.warn("Mal-formatted Property: [" + Properties.PROP_HTTP_CONNECTION_TIMEOUT + "=" + value + "] Property will be skipped.");
+                        log.warn("Mal-formatted Property: [" + Properties.PROP_HTTP_CONNECTION_TIMEOUT + "=" + value + "]. Integer expected. Property will be skipped.");
                 }
             }
             if (properties.containsKey(PROP_HTTP_SOCKET_TIMEOUT)) {
@@ -143,7 +146,7 @@
                     options.setProperty(HTTPConstants.SO_TIMEOUT, Integer.valueOf(value));
                 } catch (NumberFormatException e) {
                     if (log.isWarnEnabled())
-                        log.warn("Mal-formatted Property: [" + Properties.PROP_HTTP_SOCKET_TIMEOUT + "=" + value + "] Property will be skipped.");
+                        log.warn("Mal-formatted Property: [" + Properties.PROP_HTTP_SOCKET_TIMEOUT + "=" + value + "]. Integer expected. Property will be skipped.");
                 }
             }
             if (properties.containsKey(PROP_HTTP_PROTOCOL_ENCODING)) {
@@ -164,6 +167,18 @@
             if (properties.containsKey(PROP_HTTP_MAX_REDIRECTS)) {
                 if (log.isWarnEnabled()) log.warn("Property Not Supported: " + PROP_HTTP_MAX_REDIRECTS);
             }
+            if (properties.containsKey(PROP_JMS_REPLY_DESTINATION)) {
+                options.setProperty(JMSConstants.REPLY_PARAM, properties.get(PROP_JMS_REPLY_DESTINATION));
+            }
+            if (properties.containsKey(PROP_JMS_REPLY_TIMEOUT)) {
+                String value = properties.get(PROP_JMS_REPLY_TIMEOUT);
+                try {
+                    options.setProperty(JMSConstants.JMS_WAIT_REPLY, Long.valueOf(value));
+                } catch (NumberFormatException e) {
+                    if (log.isWarnEnabled())
+                        log.warn("Mal-formatted Property: [" + Properties.PROP_JMS_REPLY_TIMEOUT + "=" + value + "]. Long expected. Property will be skipped.");
+                }
+            }
 
             // iterate through the properties to get Headers & Proxy information
             Object[] o = getProxyAndHeaders(properties);
@@ -268,6 +283,7 @@
         static class UnmodifiableHttpParams implements HttpParams {
 
             final HttpParams p;
+
             private UnmodifiableHttpParams(HttpParams p) {
                 this.p = p;
             }