cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r982156 - in /cxf/branches/2.2.x-fixes: ./ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConfigurationTest.java
Date Wed, 04 Aug 2010 08:25:32 GMT
Author: sergeyb
Date: Wed Aug  4 08:25:32 2010
New Revision: 982156

URL: http://svn.apache.org/viewvc?rev=982156&view=rev
Log:
Merged revisions 982153 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r982153 | sergeyb | 2010-08-04 09:17:31 +0100 (Wed, 04 Aug 2010) | 1 line
  
  Reverting the change to JMSConfiguration
........

Removed:
    cxf/branches/2.2.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConfigurationTest.java
Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug  4 08:25:32 2010
@@ -1 +1 @@
-/cxf/trunk:980898-980941,981508,981804
+/cxf/trunk:980898-980941,981508,981804,982153

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java?rev=982156&r1=982155&r2=982156&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
Wed Aug  4 08:25:32 2010
@@ -23,6 +23,7 @@ import javax.jms.Message;
 import javax.jms.XAConnectionFactory;
 
 import org.apache.cxf.configuration.ConfigurationException;
+import org.springframework.beans.factory.InitializingBean;
 import org.springframework.beans.factory.annotation.Required;
 import org.springframework.core.task.TaskExecutor;
 import org.springframework.jms.connection.SingleConnectionFactory;
@@ -33,7 +34,7 @@ import org.springframework.jms.support.d
 import org.springframework.jndi.JndiTemplate;
 import org.springframework.transaction.PlatformTransactionManager;
 
-public class JMSConfiguration {
+public class JMSConfiguration implements InitializingBean {
     /**
      * The use of -1 is to make easier to determine 
      * if the setCacheLevel has been called.
@@ -238,6 +239,12 @@ public class JMSConfiguration {
         this.durableSubscriptionName = durableSubscriptionName;
     }
 
+    public void afterPropertiesSet() throws Exception {
+        if (connectionFactory == null) {
+            throw new RuntimeException("Required property connectionfactory was not set");
+        }
+    }
+
     @Required
     public void setConnectionFactory(ConnectionFactory connectionFactory) {
         this.connectionFactory = connectionFactory;
@@ -414,9 +421,6 @@ public class JMSConfiguration {
             if (connectionFactory == null) {
                 connectionFactory = JMSFactory.getConnectionFactoryFromJndi(this);
             }
-            if (connectionFactory == null) {
-                throw new RuntimeException("connectionFactory has not been initialized");
-            }
             if (wrapInSingleConnectionFactory && !(connectionFactory instanceof SingleConnectionFactory))
{
                 SingleConnectionFactory scf;
                 if (useJms11) {



Mime
View raw message