activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r657904 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
Date Mon, 19 May 2008 18:39:59 GMT
Author: chirino
Date: Mon May 19 11:39:59 2008
New Revision: 657904

URL: http://svn.apache.org/viewvc?rev=657904&view=rev
Log:
making the journal broker aware so that it can pass on the broker service config to the long
term persistence
adapter if it is also broker aware.


Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java?rev=657904&r1=657903&r2=657904&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
Mon May 19 11:39:59 2008
@@ -38,6 +38,8 @@
 import org.apache.activeio.journal.RecordLocation;
 import org.apache.activeio.packet.ByteArrayPacket;
 import org.apache.activeio.packet.Packet;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.BrokerServiceAware;
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQQueue;
@@ -79,7 +81,7 @@
  * @org.apache.xbean.XBean
  * @version $Revision: 1.17 $
  */
-public class JournalPersistenceAdapter implements PersistenceAdapter, JournalEventListener,
UsageListener {
+public class JournalPersistenceAdapter implements PersistenceAdapter, JournalEventListener,
UsageListener, BrokerServiceAware {
 
     private static final Log LOG = LogFactory.getLog(JournalPersistenceAdapter.class);
 
@@ -689,4 +691,11 @@
         return 0;
     }
 
+    public void setBrokerService(BrokerService brokerService) {
+        PersistenceAdapter pa = getLongTermPersistence();
+        if( pa instanceof BrokerServiceAware ) {
+            ((BrokerServiceAware)pa).setBrokerService(brokerService);
+        }
+    }
+
 }



Mime
View raw message