activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r530131 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java
Date Wed, 18 Apr 2007 19:04:03 GMT
Author: rajdavies
Date: Wed Apr 18 12:04:02 2007
New Revision: 530131

URL: http://svn.apache.org/viewvc?view=rev&rev=530131
Log:
create default ProducerState for dummy ProducerBrokerExchange to prevent npe when sending
to dead letter queues

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java?view=diff&rev=530131&r1=530130&r2=530131
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java
Wed Apr 18 12:04:02 2007
@@ -20,6 +20,8 @@
 import org.apache.activemq.broker.ProducerBrokerExchange;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.Message;
+import org.apache.activemq.command.ProducerInfo;
+import org.apache.activemq.state.ProducerState;
 
 public class BrokerSupport {
     
@@ -39,7 +41,10 @@
         boolean originalFlowControl=context.isProducerFlowControl();
         try{
             context.setProducerFlowControl(false);
+            ProducerInfo info = new ProducerInfo();
+            ProducerState state = new ProducerState(info);
             ProducerBrokerExchange producerExchange = new ProducerBrokerExchange();
+            producerExchange.setProducerState(state);
             producerExchange.setMutable(true);
             producerExchange.setConnectionContext(context);
             context.getBroker().send(producerExchange,message);



Mime
View raw message