cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r803988 - in /cxf/branches/2.1.x-fixes: ./ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/
Date Thu, 13 Aug 2009 18:53:42 GMT
Author: dkulp
Date: Thu Aug 13 18:53:41 2009
New Revision: 803988

URL: http://svn.apache.org/viewvc?rev=803988&view=rev
Log:
Merged revisions 803979 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes

................
  r803979 | dkulp | 2009-08-13 14:18:56 -0400 (Thu, 13 Aug 2009) | 10 lines
  
  Merged revisions 803689 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r803689 | dkulp | 2009-08-12 16:06:52 -0400 (Wed, 12 Aug 2009) | 2 lines
    
    Update JMS to allow injecting of custom JmsTemplate and
    AbstractMessageLIstenerContainer objects
  ........
................

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
    cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
    cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
    cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
    cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 13 18:53:41 2009
@@ -1,2 +1,2 @@
-/cxf/branches/2.2.x-fixes:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902,780911,781497,781841,782733,782735-782736,783099,783407,784064,784197,785293,785296,785298-785299,785301,785656,786158,786587,786589,786591-786592,786640,787272,787276,787282-787283,787285,787295,787307,787324,7873
 67,788824-788825,788827-788828,788830,789423,789429,789707,789709-789710,789712,789721,789905,789908,789910,789912,790295,790646-790647,790651,790654-790655,790659,791948,791950,791952,791955,792276,792288,792291,792992,792995,792998,794402,794404,794735,794797,794799,794803,795161-795162,796300-796301,796598,797449,797452-797453,797460,797463-797464,797521-797522,797584-797585,797645,797652,797701,797884,797886,798348-798350,798568,798574-798575,798577-798578,798586,798608,798655,798752,798942,799444,799449,799738,799740,800514-800516,801382-801384,803960,803962
-/cxf/trunk:782181,782728-782730,783097,783396,784059,784181,784895,785279-785282,785468,786142,786271,786395,786582-786583,786638,786647,787269,787277-787279,787290,787305,787323,787366,788060,788187,788703,788774,788820,789371,789420,789527-789529,789704-789705,789896,789898-789900,790294,790637-790644,791354,791538,791753,791947,792261-792263,792684,792975,792985,794297,794396,794728,794778-794780,794892,795160,796022-796023,796593,796780,797194,797231-797233,797442,797505,797517,797581-797582,797640,797651,797699,797882-797883,798344-798346,798479,798533,798551,798557,798561-798562,798570,798573,798584,798654,798749,798929,799439,799448,799637,799724,799792,800453,800497,801380-801381,802892,803129
+/cxf/branches/2.2.x-fixes:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902,780911,781497,781841,782733,782735-782736,783099,783407,784064,784197,785293,785296,785298-785299,785301,785656,786158,786587,786589,786591-786592,786640,787272,787276,787282-787283,787285,787295,787307,787324,7873
 67,788824-788825,788827-788828,788830,789423,789429,789707,789709-789710,789712,789721,789905,789908,789910,789912,790295,790646-790647,790651,790654-790655,790659,791948,791950,791952,791955,792276,792288,792291,792992,792995,792998,794402,794404,794735,794797,794799,794803,795161-795162,796300-796301,796598,797449,797452-797453,797460,797463-797464,797521-797522,797584-797585,797645,797652,797701,797884,797886,798348-798350,798568,798574-798575,798577-798578,798586,798608,798655,798752,798942,799444,799449,799738,799740,800514-800516,801382-801384,803960,803962,803979
+/cxf/trunk:782181,782728-782730,783097,783396,784059,784181,784895,785279-785282,785468,786142,786271,786395,786582-786583,786638,786647,787269,787277-787279,787290,787305,787323,787366,788060,788187,788703,788774,788820,789371,789420,789527-789529,789704-789705,789896,789898-789900,790294,790637-790644,791354,791538,791753,791947,792261-792263,792684,792975,792985,794297,794396,794728,794778-794780,794892,795160,796022-796023,796593,796780,797194,797231-797233,797442,797505,797517,797581-797582,797640,797651,797699,797882-797883,798344-798346,798479,798533,798551,798557,798561-798562,798570,798573,798584,798654,798749,798929,799439,799448,799637,799724,799792,800453,800497,801380-801381,802892,803129,803689

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

Modified: cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java?rev=803988&r1=803987&r2=803988&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
Thu Aug 13 18:53:41 2009
@@ -28,6 +28,8 @@
 import org.springframework.core.task.TaskExecutor;
 import org.springframework.jms.connection.SingleConnectionFactory;
 import org.springframework.jms.connection.SingleConnectionFactory102;
+import org.springframework.jms.core.JmsTemplate;
+import org.springframework.jms.listener.AbstractMessageListenerContainer;
 import org.springframework.jms.support.destination.DestinationResolver;
 import org.springframework.jndi.JndiTemplate;
 import org.springframework.transaction.PlatformTransactionManager;
@@ -42,7 +44,10 @@
     static final boolean DEFAULT_USEJMS11 = false;
     
     private boolean usingEndpointInfo = true;
-
+    
+    private JmsTemplate jmsTemplate;
+    private AbstractMessageListenerContainer messageListenerContainer;
+    
     private JndiTemplate jndiTemplate;
     private ConnectionFactory connectionFactory;
     private DestinationResolver destinationResolver;
@@ -459,4 +464,20 @@
     public void setEnforceSpec(boolean enforceSpec) {
         this.enforceSpec = enforceSpec;
     }
+
+    public void setJmsTemplate(JmsTemplate jmsTemplate) {
+        this.jmsTemplate = jmsTemplate;
+    }
+
+    public JmsTemplate getJmsTemplate() {
+        return jmsTemplate;
+    }
+
+    public AbstractMessageListenerContainer getMessageListenerContainer() {
+        return messageListenerContainer;
+    }
+
+    public void setMessageListenerContainer(AbstractMessageListenerContainer messageListenerContainer)
{
+        this.messageListenerContainer = messageListenerContainer;
+    }
 }

Modified: cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?rev=803988&r1=803987&r2=803988&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Thu Aug 13 18:53:41 2009
@@ -66,7 +66,7 @@
 import org.springframework.jms.core.JmsTemplate;
 import org.springframework.jms.core.MessageCreator;
 import org.springframework.jms.core.SessionCallback;
-import org.springframework.jms.listener.DefaultMessageListenerContainer;
+import org.springframework.jms.listener.AbstractMessageListenerContainer;
 import org.springframework.jms.support.JmsUtils;
 import org.springframework.jms.support.destination.DestinationResolver;
 
@@ -78,7 +78,7 @@
     private JMSConfiguration jmsConfig;
     private Bus bus;
     private EndpointInfo ei;
-    private DefaultMessageListenerContainer jmsListener;
+    private AbstractMessageListenerContainer jmsListener;
     private Collection<JMSContinuation> continuations = 
         new ConcurrentLinkedQueue<JMSContinuation>();
 

Modified: cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java?rev=803988&r1=803987&r2=803988&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
Thu Aug 13 18:53:41 2009
@@ -36,6 +36,7 @@
 import org.springframework.jms.core.JmsTemplate;
 import org.springframework.jms.core.JmsTemplate102;
 import org.springframework.jms.core.SessionCallback;
+import org.springframework.jms.listener.AbstractMessageListenerContainer;
 import org.springframework.jms.listener.DefaultMessageListenerContainer;
 import org.springframework.jms.listener.DefaultMessageListenerContainer102;
 import org.springframework.jms.support.destination.DestinationResolver;
@@ -92,6 +93,9 @@
      * @return
      */
     public static JmsTemplate createJmsTemplate(JMSConfiguration jmsConfig, JMSMessageHeadersType
headers) {
+        if (jmsConfig.getJmsTemplate() != null) {
+            return jmsConfig.getJmsTemplate();
+        }
         JmsTemplate jmsTemplate = jmsConfig.isUseJms11() ? new JmsTemplate() : new JmsTemplate102();
         jmsTemplate.setConnectionFactory(jmsConfig.getOrCreateWrappedConnectionFactory());
         jmsTemplate.setPubSubDomain(jmsConfig.isPubSubDomain());
@@ -116,12 +120,15 @@
         return jmsTemplate;
     }
 
-    public static DefaultMessageListenerContainer createJmsListener(EndpointInfo ei,
+    public static AbstractMessageListenerContainer createJmsListener(EndpointInfo ei,
                                                                     JMSConfiguration jmsConfig,
                                                                     MessageListener listenerHandler,
                                                                     String destinationName,

                                                                     String messageSelectorPrefix,
                                                                     boolean userCID) {
+        if (jmsConfig.getMessageListenerContainer() != null) {
+            return jmsConfig.getMessageListenerContainer();
+        }
         DefaultMessageListenerContainer jmsListener = null;
         
         if (jmsConfig.isUseJms11()) {
@@ -188,7 +195,7 @@
         jmsListener.setAutoStartup(true);
         jmsListener.setConnectionFactory(jmsConfig.getOrCreateWrappedConnectionFactory());
         jmsListener.setMessageSelector(jmsConfig.getMessageSelector());
-        //jmsListener.setSubscriptionDurable(jmsConfig.isSubscriptionDurable());
+        jmsListener.setSubscriptionDurable(jmsConfig.isSubscriptionDurable());
         jmsListener.setDurableSubscriptionName(jmsConfig.getDurableSubscriptionName());
         jmsListener.setSessionTransacted(jmsConfig.isSessionTransacted());
         jmsListener.setTransactionManager(jmsConfig.getTransactionManager());

Modified: cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java?rev=803988&r1=803987&r2=803988&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
Thu Aug 13 18:53:41 2009
@@ -30,6 +30,7 @@
 import org.apache.cxf.message.Message;
 import org.apache.cxf.transport.MessageObserver;
 import org.apache.cxf.transport.jms.JMSConfiguration;
+import org.springframework.jms.listener.AbstractMessageListenerContainer;
 import org.springframework.jms.listener.DefaultMessageListenerContainer;
 
 public class JMSContinuation implements Continuation {
@@ -38,7 +39,7 @@
     private Message inMessage;
     private MessageObserver incomingObserver;
     private Collection<JMSContinuation> continuations;
-    private DefaultMessageListenerContainer jmsListener;
+    private AbstractMessageListenerContainer jmsListener;
     private JMSConfiguration jmsConfig;
     
     private Object userObject;
@@ -50,7 +51,7 @@
     
     public JMSContinuation(Bus b, Message m, MessageObserver observer,
                            Collection<JMSContinuation> cList, 
-                           DefaultMessageListenerContainer jmsListener,
+                           AbstractMessageListenerContainer jmsListener,
                            JMSConfiguration jmsConfig) {
         bus = b;
         inMessage = m;    
@@ -151,7 +152,9 @@
     protected void updateContinuations(boolean remove) {
 
         if (jmsConfig.getMaxSuspendedContinuations() < 0
-            || jmsListener.getCacheLevel() >= DefaultMessageListenerContainer.CACHE_CONSUMER)
{
+            || (jmsListener instanceof DefaultMessageListenerContainer
+                && ((DefaultMessageListenerContainer)jmsListener).getCacheLevel()

+                    >= DefaultMessageListenerContainer.CACHE_CONSUMER)) {
             modifyList(remove);
             return;
         }

Modified: cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java?rev=803988&r1=803987&r2=803988&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java
Thu Aug 13 18:53:41 2009
@@ -27,7 +27,7 @@
 import org.apache.cxf.message.Message;
 import org.apache.cxf.transport.MessageObserver;
 import org.apache.cxf.transport.jms.JMSConfiguration;
-import org.springframework.jms.listener.DefaultMessageListenerContainer;
+import org.springframework.jms.listener.AbstractMessageListenerContainer;
 
 public class JMSContinuationProvider implements ContinuationProvider {
 
@@ -35,14 +35,14 @@
     private Message inMessage;
     private MessageObserver incomingObserver;
     private Collection<JMSContinuation> continuations;
-    private DefaultMessageListenerContainer jmsListener;
+    private AbstractMessageListenerContainer jmsListener;
     private JMSConfiguration jmsConfig;
     
     public JMSContinuationProvider(Bus b,
                                    Message m, 
                                    MessageObserver observer,
                                    Collection<JMSContinuation> cList,
-                                   DefaultMessageListenerContainer jmsListener,
+                                   AbstractMessageListenerContainer jmsListener,
                                    JMSConfiguration jmsConfig) {
         bus = b;
         inMessage = m;    



Mime
View raw message