mirror of https://github.com/apache/activemq.git
Fixes NPE that was occurring.
This commit is contained in:
parent
21fe8cac7d
commit
70c698f988
|
@ -43,7 +43,7 @@ import java.util.*;
|
||||||
*
|
*
|
||||||
* @org.apache.xbean.XBean element="mKahaDB"
|
* @org.apache.xbean.XBean element="mKahaDB"
|
||||||
*/
|
*/
|
||||||
public class MultiKahaDBPersistenceAdapter extends LockableServiceSupport implements PersistenceAdapter {
|
public class MultiKahaDBPersistenceAdapter extends LockableServiceSupport implements PersistenceAdapter, BrokerServiceAware {
|
||||||
static final Logger LOG = LoggerFactory.getLogger(MultiKahaDBPersistenceAdapter.class);
|
static final Logger LOG = LoggerFactory.getLogger(MultiKahaDBPersistenceAdapter.class);
|
||||||
|
|
||||||
final static ActiveMQDestination matchAll = new AnyDestination(new ActiveMQDestination[]{new ActiveMQQueue(">"), new ActiveMQTopic(">")});
|
final static ActiveMQDestination matchAll = new AnyDestination(new ActiveMQDestination[]{new ActiveMQQueue(">"), new ActiveMQTopic(">")});
|
||||||
|
@ -438,12 +438,12 @@ public class MultiKahaDBPersistenceAdapter extends LockableServiceSupport implem
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBrokerService(BrokerService brokerService) {
|
public void setBrokerService(BrokerService brokerService) {
|
||||||
|
this.brokerService = brokerService;
|
||||||
for (PersistenceAdapter persistenceAdapter : adapters) {
|
for (PersistenceAdapter persistenceAdapter : adapters) {
|
||||||
if( persistenceAdapter instanceof BrokerServiceAware ) {
|
if( persistenceAdapter instanceof BrokerServiceAware ) {
|
||||||
((BrokerServiceAware)persistenceAdapter).setBrokerService(getBrokerService());
|
((BrokerServiceAware)persistenceAdapter).setBrokerService(getBrokerService());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.brokerService = brokerService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BrokerService getBrokerService() {
|
public BrokerService getBrokerService() {
|
||||||
|
|
Loading…
Reference in New Issue