cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r702893 - in /cxf/branches/2.0.x-fixes: ./ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/
Date Wed, 08 Oct 2008 14:38:18 GMT
Author: dkulp
Date: Wed Oct  8 07:38:18 2008
New Revision: 702893

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

................
  r702642 | dkulp | 2008-10-07 17:21:58 -0400 (Tue, 07 Oct 2008) | 9 lines
  
  Merged revisions 701783 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r701783 | cschneider | 2008-10-05 08:49:52 -0400 (Sun, 05 Oct 2008) | 1 line
    
    CXF-1832 Example for JMSConfigFeature
  ........
................

Added:
    cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFeature.java
      - copied unchanged from r702642, cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFeature.java
Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
    cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
    cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
    cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
    cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct  8 07:38:18 2008
@@ -1,3 +1,3 @@
-/cxf/branches/2.1.x-fixes:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009,678559,678629,678808,678852,678891,678893,679248,679597,680435,681060,681165,681813,681816,682902,682951,683089,683290,683318,684099,684790-684793,684842,684862,684895-684918,685205,685253,686237,686283,686299,686333-686364,686765,686827,687097,687464-687465,689109,689112,689122,691316,691357,691491,691711,691715,691745,692162-692163,692468,692500,694466-694469,694472,694717,694748-694749,694870,695503,695509,695553,695555,695563,695875-695877,695940,695980,696436,696455,696721,697086,698129,701526,701634,702275,702443,702527,702582,702604,702610
-/cxf/trunk:651669-686342,686344-686363,686764,686820,687096,687387,687463,688086,688102,688735,691271,691355,691488,691602,691706,691728,692116,692157,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694869,695396,695484,695537,695552,695561,695619,695684,695835,695935,695977,696094,696433,696720,697085,698128,700261,700602,702267,702580,702602,702609
+/cxf/branches/2.1.x-fixes:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009,678559,678629,678808,678852,678891,678893,679248,679597,680435,681060,681165,681813,681816,682902,682951,683089,683290,683318,684099,684790-684793,684842,684862,684895-684918,685205,685253,686237,686283,686299,686333-686364,686765,686827,687097,687464-687465,689109,689112,689122,691316,691357,691491,691711,691715,691745,692162-692163,692468,692500,694466-694469,694472,694717,694748-694749,694870,695503,695509,695553,695555,695563,695875-695877,695940,695980,696436,696455,696721,697086,698129,701526,701634,702275,702443,702527,702582,702604,702610,702642
+/cxf/trunk:651669-686342,686344-686363,686764,686820,687096,687387,687463,688086,688102,688735,691271,691355,691488,691602,691706,691728,692116,692157,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694869,695396,695484,695537,695552,695561,695619,695684,695835,695935,695977,696094,696433,696720,697085,698128,700261,700602,701783,702267,702580,702602,702609
 /incubator/cxf/trunk:434594-651668

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

Modified: cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java?rev=702893&r1=702892&r2=702893&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
Wed Oct  8 07:38:18 2008
@@ -69,6 +69,12 @@
      * JMSOutputStream will then call back the sendExchange method of this class. {@inheritDoc}
      */
     public void prepare(Message message) throws IOException {
+        if (jmsConfig.getTargetDestination() == null || jmsConfig.getConnectionFactory()
== null) {
+            String name =  ".jms-conduit";
+            throw new RuntimeException("Insufficient configuration for Conduit. "
+                                       + "Did you configure a <jms:conduit name=\"" +
name
+                                       + "\"> and set the jndiConnectionFactoryName ?");
+        }
         boolean isTextPayload = JMSConstants.TEXT_MESSAGE_TYPE.equals(jmsConfig.getMessageType());
         JMSOutputStream out = new JMSOutputStream(this, message.getExchange(), isTextPayload);
         message.setContent(OutputStream.class, out);

Modified: cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java?rev=702893&r1=702892&r2=702893&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
Wed Oct  8 07:38:18 2008
@@ -23,6 +23,8 @@
 
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.beans.factory.annotation.Required;
+import org.springframework.core.task.TaskExecutor;
+import org.springframework.jms.core.JmsTemplate;
 import org.springframework.jms.support.destination.DestinationResolver;
 import org.springframework.transaction.PlatformTransactionManager;
 
@@ -30,6 +32,7 @@
     private ConnectionFactory connectionFactory;
     private DestinationResolver destinationResolver;
     private PlatformTransactionManager transactionManager;
+    private TaskExecutor taskExecutor;
     private boolean useJms11 = true;
     private boolean useJndi;
     private boolean messageIdEnabled = true;
@@ -42,6 +45,9 @@
     private int priority = Message.DEFAULT_PRIORITY;
     private long timeToLive = Message.DEFAULT_TIME_TO_LIVE;
     private boolean sessionTransacted;
+    
+    private int concurrentConsumers = 1;
+    private int maxConcurrentConsumers = 1;
 
     private volatile String messageSelector;
     private boolean subscriptionDurable;
@@ -227,4 +233,28 @@
         this.transactionManager = transactionManager;
     }
 
+    public int getConcurrentConsumers() {
+        return concurrentConsumers;
+    }
+
+    public void setConcurrentConsumers(int concurrentConsumers) {
+        this.concurrentConsumers = concurrentConsumers;
+    }
+
+    public int getMaxConcurrentConsumers() {
+        return maxConcurrentConsumers;
+    }
+
+    public void setMaxConcurrentConsumers(int maxConcurrentConsumers) {
+        this.maxConcurrentConsumers = maxConcurrentConsumers;
+    }
+
+    public TaskExecutor getTaskExecutor() {
+        return taskExecutor;
+    }
+
+    public void setTaskExecutor(TaskExecutor taskExecutor) {
+        this.taskExecutor = taskExecutor;
+    }
+
 }

Modified: cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?rev=702893&r1=702892&r2=702893&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Wed Oct  8 07:38:18 2008
@@ -89,6 +89,12 @@
      */
     public void activate() {
         getLogger().log(Level.INFO, "JMSDestination activate().... ");
+        String name = endpointInfo.getName().toString() + ".jms-destination";
+        if (jmsConfig.getTargetDestination() == null || jmsConfig.getConnectionFactory()
== null) {
+            throw new RuntimeException("Insufficient configuration for Destination. "
+                                       + "Did you configure a <jms:destination name=\""
+ name
+                                       + "\"> and set the jndiConnectionFactoryName ?");
+        }
         jmsListener = JMSFactory.createJmsListener(jmsConfig, this, jmsConfig.getTargetDestination());
         jmsConfig.getTargetDestination();
     }

Modified: cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java?rev=702893&r1=702892&r2=702893&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
Wed Oct  8 07:38:18 2008
@@ -79,24 +79,30 @@
     public static DefaultMessageListenerContainer createJmsListener(JMSConfiguration jmsConfig,
                                                                     MessageListener listenerHandler,
                                                                     String destinationName)
{
-        DefaultMessageListenerContainer jmsListener2 = jmsConfig.isUseJms11()
+        DefaultMessageListenerContainer jmsListener = jmsConfig.isUseJms11()
             ? new DefaultMessageListenerContainer() : new DefaultMessageListenerContainer102();
-        jmsListener2.setPubSubDomain(jmsConfig.isPubSubDomain());
-        jmsListener2.setAutoStartup(true);
-        jmsListener2.setConnectionFactory(jmsConfig.getConnectionFactory());
-        jmsListener2.setMessageSelector(jmsConfig.getMessageSelector());
-        jmsListener2.setDurableSubscriptionName(jmsConfig.getDurableSubscriptionName());
-        jmsListener2.setSessionTransacted(jmsConfig.isSessionTransacted());
-        jmsListener2.setTransactionManager(jmsConfig.getTransactionManager());
-        jmsListener2.setMessageListener(listenerHandler);
+        jmsListener.setConcurrentConsumers(jmsConfig.getConcurrentConsumers());
+        jmsListener.setMaxConcurrentConsumers(jmsConfig.getMaxConcurrentConsumers());
+        jmsListener.setPubSubDomain(jmsConfig.isPubSubDomain());
+        jmsListener.setAutoStartup(true);
+        jmsListener.setConnectionFactory(jmsConfig.getConnectionFactory());
+        jmsListener.setMessageSelector(jmsConfig.getMessageSelector());
+        jmsListener.setDurableSubscriptionName(jmsConfig.getDurableSubscriptionName());
+        jmsListener.setSessionTransacted(jmsConfig.isSessionTransacted());
+        jmsListener.setTransactionManager(jmsConfig.getTransactionManager());
+        jmsListener.setMessageListener(listenerHandler);
         if (jmsConfig.getDestinationResolver() != null) {
-            jmsListener2.setDestinationResolver(jmsConfig.getDestinationResolver());
+            jmsListener.setDestinationResolver(jmsConfig.getDestinationResolver());
+        }
+        if (jmsConfig.getTaskExecutor() != null) {
+            jmsListener.setTaskExecutor(jmsConfig.getTaskExecutor());
         }
         JmsTemplate jmsTemplate = createJmsTemplate(jmsConfig, null);
-        jmsListener2.setDestination(JMSFactory.resolveOrCreateDestination(jmsTemplate, destinationName,
-                                                                          jmsConfig.isPubSubDomain()));
-        jmsListener2.initialize();
-        return jmsListener2;
+        Destination dest = JMSFactory.resolveOrCreateDestination(jmsTemplate, destinationName,
jmsConfig
+            .isPubSubDomain());
+        jmsListener.setDestination(dest);
+        jmsListener.initialize();
+        return jmsListener;
     }
 
     /**

Modified: cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java?rev=702893&r1=702892&r2=702893&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
Wed Oct  8 07:38:18 2008
@@ -136,14 +136,6 @@
 
         jmsConfig.setConnectionFactory(cf);
 
-        if (jmsConfig.getTargetDestination() == null || jmsConfig.getConnectionFactory()
== null) {
-            throw new RuntimeException("Insufficient configuration for "
-                                       + (isConduit ? "Conduit" : "Destination") + ". "
-                                       + "Did you configure a <jms:"
-                                       + (isConduit ? "conduit" : "destination") + " name=\""
+ name
-                                       + "\"> and set the jndiConnectionFactoryName ?");
-        }
-
         return jmsConfig;
     }
 



Mime
View raw message