activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r520865 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq: broker/region/QueueSubscription.java command/ActiveMQMessage.java
Date Wed, 21 Mar 2007 12:51:10 GMT
Author: rajdavies
Date: Wed Mar 21 05:51:09 2007
New Revision: 520865

URL: http://svn.apache.org/viewvc?view=rev&rev=520865
Log:
fixes for LargeStreamletTest

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java?view=diff&rev=520865&r1=520864&r2=520865
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java
Wed Mar 21 05:51:09 2007
@@ -131,7 +131,7 @@
         if (message instanceof ActiveMQMessage) {
             ActiveMQMessage activeMessage = (ActiveMQMessage) message;
             try {
-                activeMessage.setBooleanProperty("JMSXGroupFirstForConsumer", true);
+                activeMessage.setBooleanProperty("JMSXGroupFirstForConsumer", true, false);
             }
             catch (JMSException e) {
                 log.warn("Failed to set boolean header: " + e, e);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java?view=diff&rev=520865&r1=520864&r2=520865
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
Wed Mar 21 05:51:09 2007
@@ -381,9 +381,16 @@
             }
         });
     }
+    
+    public void setObjectProperty(String name, Object value) throws JMSException{
+        setObjectProperty(name,value,true);
+    }
 
-    public void setObjectProperty(String name, Object value) throws JMSException {
-        checkReadOnlyProperties();
+    public void setObjectProperty(String name, Object value, boolean checkReadOnly) throws
JMSException {
+        
+        if (checkReadOnly) {
+            checkReadOnlyProperties();
+        }
         if (name == null || name.equals("")) {
             throw new IllegalArgumentException("Property name cannot be empty or null");
         }
@@ -535,7 +542,10 @@
     }
 
     public void setBooleanProperty(String name, boolean value) throws JMSException {
-        setObjectProperty(name, value ? Boolean.TRUE : Boolean.FALSE);
+        setBooleanProperty(name,value,true);
+    }
+    public void setBooleanProperty(String name, boolean value,boolean checkReadOnly) throws
JMSException {
+        setObjectProperty(name, value ? Boolean.TRUE : Boolean.FALSE,checkReadOnly);
     }
 
     public void setByteProperty(String name, byte value) throws JMSException {



Mime
View raw message