mirror of https://github.com/apache/activemq.git
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. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@657904 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ab3b155ff6
commit
b9797bc618
|
@ -38,6 +38,8 @@ import org.apache.activeio.journal.JournalEventListener;
|
||||||
import org.apache.activeio.journal.RecordLocation;
|
import org.apache.activeio.journal.RecordLocation;
|
||||||
import org.apache.activeio.packet.ByteArrayPacket;
|
import org.apache.activeio.packet.ByteArrayPacket;
|
||||||
import org.apache.activeio.packet.Packet;
|
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.broker.ConnectionContext;
|
||||||
import org.apache.activemq.command.ActiveMQDestination;
|
import org.apache.activemq.command.ActiveMQDestination;
|
||||||
import org.apache.activemq.command.ActiveMQQueue;
|
import org.apache.activemq.command.ActiveMQQueue;
|
||||||
|
@ -79,7 +81,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @org.apache.xbean.XBean
|
* @org.apache.xbean.XBean
|
||||||
* @version $Revision: 1.17 $
|
* @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);
|
private static final Log LOG = LogFactory.getLog(JournalPersistenceAdapter.class);
|
||||||
|
|
||||||
|
@ -689,4 +691,11 @@ public class JournalPersistenceAdapter implements PersistenceAdapter, JournalEve
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setBrokerService(BrokerService brokerService) {
|
||||||
|
PersistenceAdapter pa = getLongTermPersistence();
|
||||||
|
if( pa instanceof BrokerServiceAware ) {
|
||||||
|
((BrokerServiceAware)pa).setBrokerService(brokerService);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue