cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r725754 - in /cxf/trunk/rt/transports/jms/src/main: java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java resources/schemas/wsdl/jms.xsd
Date Thu, 11 Dec 2008 17:35:50 GMT
Author: dkulp
Date: Thu Dec 11 09:35:50 2008
New Revision: 725754

URL: http://svn.apache.org/viewvc?rev=725754&view=rev
Log:
Add a flag to the old config to turn on the reconnectOnException support in the spring JMS
connection stuff.

Modified:
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
    cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java?rev=725754&r1=725753&r2=725754&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
Thu Dec 11 09:35:50 2008
@@ -47,10 +47,16 @@
     private ServerConfig serverConfig;
     private ServerBehaviorPolicyType serverBehavior;
 
-    private ConnectionFactory getConnectionFactoryFromJndi(String connectionFactoryName,
String userName,
-                                                           String password, JndiTemplate
jt,
-                                                           boolean use11,
+    private ConnectionFactory getConnectionFactoryFromJndi(JndiTemplate jt,
                                                            boolean pubSubDomain) {
+        
+        String connectionFactoryName = address.getJndiConnectionFactoryName();
+        String userName = address.getConnectionUserName();
+        String password = address.getConnectionPassword();
+        boolean use11 = address.isSetUseJms11() 
+            ? address.isUseJms11() : JMSConfiguration.DEFAULT_USEJMS11;
+            
+            
         if (connectionFactoryName == null) {
             return null;
         }
@@ -62,15 +68,24 @@
             uccf.setTargetConnectionFactory(connectionFactory);
 
             if (use11) {
-                return new SingleConnectionFactory(uccf);
+                SingleConnectionFactory cf = new SingleConnectionFactory(uccf);
+                if (address.isSetReconnectOnException() && address.isReconnectOnException())
{
+                    cf.setReconnectOnException(true);
+                }
+                return cf;
             }
-            return new SingleConnectionFactory102(uccf, pubSubDomain);
+            SingleConnectionFactory102 cf = new SingleConnectionFactory102(uccf, pubSubDomain);
+            if (address.isSetReconnectOnException() && address.isReconnectOnException())
{
+                cf.setReconnectOnException(true);
+            }
+            return cf;
         } catch (NamingException e) {
             throw new RuntimeException(e);
         }
     }
 
-    public JMSConfiguration createJMSConfigurationFromEndpointInfo(Bus bus, EndpointInfo
endpointInfo,
+    public JMSConfiguration createJMSConfigurationFromEndpointInfo(Bus bus,
+                                                                   EndpointInfo endpointInfo,
                                                                    boolean isConduit) {
         jmsConfig = new JMSConfiguration();
 
@@ -99,10 +114,7 @@
         if (address.isSetDestinationStyle()) {
             pubSubDomain = DestinationStyleType.TOPIC == address.getDestinationStyle();
         }
-        ConnectionFactory cf = getConnectionFactoryFromJndi(address.getJndiConnectionFactoryName(),
address
-            .getConnectionUserName(), address.getConnectionPassword(), jt,
-            address.isSetUseJms11() ? address.isUseJms11() : JMSConfiguration.DEFAULT_USEJMS11,
-                pubSubDomain);
+        ConnectionFactory cf = getConnectionFactoryFromJndi(jt, pubSubDomain);
 
         jmsConfig.setConnectionFactory(cf);
         jmsConfig.setDurableSubscriptionName(serverBehavior.getDurableSubscriberName());

Modified: cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd?rev=725754&r1=725753&r2=725754&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd (original)
+++ cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd Thu Dec 11 09:35:50
2008
@@ -215,7 +215,8 @@
     					</xs:documentation>
     				</xs:annotation>
     			</xs:attribute>
-    			<xs:attribute name="useJms11" type="xs:boolean" use="optional"></xs:attribute>
+    			<xs:attribute name="useJms11" type="xs:boolean" use="optional"/>
+    			<xs:attribute name="reconnectOnException" type="xs:boolean" use="optional"/>
     		</xs:extension>
     	</xs:complexContent>
     </xs:complexType>



Mime
View raw message