activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r419049 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Date Tue, 04 Jul 2006 17:15:00 GMT
Author: jstrachan
Date: Tue Jul  4 10:15:00 2006
New Revision: 419049

URL: http://svn.apache.org/viewvc?rev=419049&view=rev
Log:
made it possible to disable advisory message support for AMQ-794

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=419049&r1=419048&r2=419049&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Tue Jul  4 10:15:00 2006
@@ -116,6 +116,7 @@
     private String masterConnectorURI;
     private JmsConnector[] jmsBridgeConnectors; //these are Jms to Jms bridges to other jms
messaging systems
     private boolean deleteAllMessagesOnStartup;
+    private boolean advisorySupport = true;
     private URI vmConnectorURI;
     private PolicyMap destinationPolicy;
     private AtomicBoolean started = new AtomicBoolean(false);
@@ -670,6 +671,17 @@
     public void setUseShutdownHook(boolean useShutdownHook) {
         this.useShutdownHook = useShutdownHook;
     }
+    
+    public boolean isAdvisorySupport() {
+        return advisorySupport;
+    }
+
+    /**
+     * Allows the support of advisory messages to be disabled for performance reasons.
+     */
+    public void setAdvisorySupport(boolean advisorySupport) {
+        this.advisorySupport = advisorySupport;
+    }
 
     public List getTransportConnectors() {
         return new ArrayList(transportConnectors);
@@ -949,7 +961,9 @@
      */
     protected Broker addInterceptors(Broker broker) throws Exception {
         broker = new TransactionBroker(broker, getPersistenceAdapter().createTransactionStore());
-        broker = new AdvisoryBroker(broker);
+        if (isAdvisorySupport()) {
+            broker = new AdvisoryBroker(broker);
+        }
         broker = new CompositeDestinationBroker(broker);
         if (isPopulateJMSXUserID()) {
             broker = new UserIDBroker(broker);



Mime
View raw message