Author: midon
Date: Wed Nov 26 11:19:03 2008
New Revision: 720952

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

Modified:
    
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/Properties.java

Modified: 
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/Properties.java
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/Properties.java?rev=720952&r1=720951&r2=720952&view=diff
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/Properties.java
 (original)
+++ 
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/Properties.java
 Wed Nov 26 11:19:03 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;
@@ -72,6 +73,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);
@@ -132,7 +135,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)) {
@@ -141,7 +144,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)) {
@@ -162,6 +165,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);
@@ -267,6 +282,7 @@
         static class UnmodifiableHttpParams implements HttpParams {
 
             final HttpParams p;
+
             private UnmodifiableHttpParams(HttpParams p) {
                 this.p = p;
             }


Reply via email to