cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r981806 - 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 Tue, 03 Aug 2010 10:12:35 GMT
Author: sergeyb
Date: Tue Aug  3 10:12:35 2010
New Revision: 981806

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

........
  r981804 | sergeyb | 2010-08-03 11:08:04 +0100 (Tue, 03 Aug 2010) | 1 line
  
  [CXF-2925] Updating JMSConfiguration for it not to implement InitializingBean
........

Added:
    cxf/branches/2.2.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConfigurationTest.java
      - copied unchanged from r981804, cxf/trunk/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 Tue Aug  3 10:12:35 2010
@@ -1 +1 @@
-/cxf/trunk:980898-980941,981508
+/cxf/trunk:980898-980941,981508,981804

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=981806&r1=981805&r2=981806&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
Tue Aug  3 10:12:35 2010
@@ -23,7 +23,6 @@ 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;
@@ -34,7 +33,7 @@ import org.springframework.jms.support.d
 import org.springframework.jndi.JndiTemplate;
 import org.springframework.transaction.PlatformTransactionManager;
 
-public class JMSConfiguration implements InitializingBean {
+public class JMSConfiguration {
     /**
      * The use of -1 is to make easier to determine 
      * if the setCacheLevel has been called.
@@ -239,12 +238,6 @@ public class JMSConfiguration implements
         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;
@@ -421,6 +414,9 @@ public class JMSConfiguration implements
             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