cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [1/3] git commit: Always do reconnects for jms
Date Wed, 30 Apr 2014 14:25:18 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 8cf96594e -> bf6da99ae


Always do reconnects for jms


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/882bda52
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/882bda52
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/882bda52

Branch: refs/heads/master
Commit: 882bda52660d3ea5b852a4d46ce552b8e2c6e08a
Parents: 8cf9659
Author: Christian Schneider <chris@die-schneider.net>
Authored: Wed Apr 30 16:23:11 2014 +0200
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Wed Apr 30 16:23:11 2014 +0200

----------------------------------------------------------------------
 .../cxf/transport/jms/JMSConfigFactory.java     |  2 -
 .../cxf/transport/jms/JMSConfiguration.java     |  8 +--
 .../cxf/transport/jms/uri/JMSEndpoint.java      | 60 ++++++++------------
 3 files changed, 26 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/882bda52/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFactory.java
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFactory.java
index 2f30507..a4f0679 100644
--- a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFactory.java
+++ b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFactory.java
@@ -68,8 +68,6 @@ public final class JMSConfigFactory {
         
         jmsConfig.setPriority(endpoint.getPriority());
         
-        jmsConfig.setReconnectOnException(endpoint.isReconnectOnException());
-        
         jmsConfig.setExplicitQosEnabled(true);
         jmsConfig.setMessageType(endpoint.getMessageType().value());
         boolean pubSubDomain = endpoint.getJmsVariant().contains(JMSEndpoint.TOPIC);

http://git-wip-us.apache.org/repos/asf/cxf/blob/882bda52/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
index f2d39c2..e1b51aa 100644
--- a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
+++ b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
@@ -44,7 +44,6 @@ public class JMSConfiguration {
     private String userName;
     private String password;
     private DestinationResolver destinationResolver = new JMSDestinationResolver();
-    private boolean reconnectOnException = true;
     private boolean pubSubNoLocal;
     private Long clientReceiveTimeout = 60000L;
     private Long serverReceiveTimeout;
@@ -336,12 +335,9 @@ public class JMSConfiguration {
         return useConduitIdSelector;
     }
 
-    public boolean isReconnectOnException() {
-        return reconnectOnException;
-    }
-
+    @Deprecated
     public void setReconnectOnException(boolean reconnectOnException) {
-        this.reconnectOnException = reconnectOnException;
+        // Ignore. We always reconnect on exceptions
     }
 
     public ConnectionFactory getConnectionFactory() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/882bda52/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpoint.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpoint.java
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpoint.java
index 1b85ab3..ffd7e57 100644
--- a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpoint.java
+++ b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/uri/JMSEndpoint.java
@@ -31,62 +31,56 @@ import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 
 /**
- * 
+ * Parses and holds configuration retrieved from a SOAP/JMS spec URI
  */
 public class JMSEndpoint {
+    // JMS Variants
     public static final String JNDI = "jndi";
     public static final String TOPIC = "topic";
     public static final String QUEUE = "queue";
     public static final String JNDI_TOPIC = "jndi-topic";
 
-    // shared parameters
-    public static final String DELIVERYMODE_PARAMETER_NAME = "deliveryMode";
-    public static final String TIMETOLIVE_PARAMETER_NAME = "timeToLive";
-    public static final String PRIORITY_PARAMETER_NAME = "priority";
-    public static final String REPLYTONAME_PARAMETER_NAME = "replyToName";
-    // The new configuration to set the message type of jms message body
-    public static final String MESSAGE_TYPE_PARAMETER_NAME = "messageType";
-
-    // default parameters
+    // default values
     public static final DeliveryModeType DELIVERYMODE_DEFAULT = DeliveryModeType.PERSISTENT;
     public static final long TIMETOLIVE_DEFAULT = Message.DEFAULT_TIME_TO_LIVE;
     public static final int PRIORITY_DEFAULT = Message.DEFAULT_PRIORITY;
 
-    // jndi parameters ? need to be sure.
-    public static final String JNDICONNECTIONFACTORYNAME_PARAMETER_NAME = "jndiConnectionFactoryName";
-    public static final String JNDIINITIALCONTEXTFACTORY_PARAMETER_NAME = "jndiInitialContextFactory";
-    public static final String JNDIURL_PARAMETER_NAME = "jndiURL";
+    /**
+     * All parameters with this prefix will go to jndiParameters and be used
+     * as the jndi inital context properties
+     */
     public static final String JNDI_PARAMETER_NAME_PREFIX = "jndi-";
 
-    // queue and topic parameters
-    public static final String TOPICREPLYTONAME_PARAMETER_NAME = "topicReplyToName";
-    
-    Map<String, String> jndiParameters = new HashMap<String, String>();
-    Map<String, String> parameters = new HashMap<String, String>();
+    private Map<String, String> jndiParameters = new HashMap<String, String>();
+    private Map<String, String> parameters = new HashMap<String, String>();
     
     private String endpointUri;
     private ConnectionFactory connectionFactory;
     private String jmsVariant;
     private String destinationName;
+
+    /**
+     * URI parameters
+     * Will be filled from URI query parameters with matching names
+     */
+    private String conduitIdSelectorPrefix;
     private DeliveryModeType deliveryMode;
-    private MessageType messageType;
-    private long timeToLive;
-    private Integer priority;
-    private String replyToName;
-    private String topicReplyToName;
+    private String durableSubscriptionName;
     private String jndiConnectionFactoryName = "ConnectionFactory";
     private String jndiInitialContextFactory;
+    private String jndiTransactionManagerName;
     private String jndiURL;
-    private String username;
+    private MessageType messageType;
     private String password;
-    private boolean reconnectOnException = true;
-    private String durableSubscriptionName;
+    private Integer priority;
     private long receiveTimeout = 60000L;
-    private String targetService;
+    private String replyToName;
     private boolean sessionTransacted;
-    private String conduitIdSelectorPrefix;
+    private String targetService;
+    private long timeToLive;
+    private String topicReplyToName;
     private boolean useConduitIdSelector = true;
-    private String jndiTransactionManagerName;
+    private String username;
 
     /**
      * @param uri
@@ -353,12 +347,6 @@ public class JMSEndpoint {
     public void setPassword(String password) {
         this.password = password;
     }
-    public boolean isReconnectOnException() {
-        return reconnectOnException;
-    }
-    public void setReconnectOnException(boolean reconnectOnException) {
-        this.reconnectOnException = reconnectOnException;
-    }
     public String getDurableSubscriptionName() {
         return durableSubscriptionName;
     }


Mime
View raw message