mirror of
https://github.com/apache/activemq.git
synced 2025-02-17 07:24:51 +00:00
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@438994 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bfaff9b37c
commit
9d4c74fb74
@ -34,6 +34,8 @@ import org.apache.activemq.broker.jmx.ManagementContext;
|
||||
import org.apache.activemq.broker.jmx.NetworkConnectorView;
|
||||
import org.apache.activemq.broker.jmx.NetworkConnectorViewMBean;
|
||||
import org.apache.activemq.broker.jmx.ProxyConnectorView;
|
||||
import org.apache.activemq.broker.region.DestinationFactory;
|
||||
import org.apache.activemq.broker.region.DestinationFactoryImpl;
|
||||
import org.apache.activemq.broker.region.CompositeDestinationInterceptor;
|
||||
import org.apache.activemq.broker.region.DestinationInterceptor;
|
||||
import org.apache.activemq.broker.region.RegionBroker;
|
||||
@ -111,6 +113,7 @@ public class BrokerService implements Service, Serializable {
|
||||
private UsageManager memoryManager;
|
||||
private PersistenceAdapter persistenceAdapter;
|
||||
private PersistenceAdapterFactory persistenceFactory;
|
||||
private DestinationFactory destinationFactory;
|
||||
private MessageAuthorizationPolicy messageAuthorizationPolicy;
|
||||
private List transportConnectors = new CopyOnWriteArrayList();
|
||||
private List networkConnectors = new CopyOnWriteArrayList();
|
||||
@ -532,6 +535,10 @@ public class BrokerService implements Service, Serializable {
|
||||
this.persistenceFactory = persistenceFactory;
|
||||
}
|
||||
|
||||
public void setDestinationFactory(DestinationFactory destinationFactory) {
|
||||
this.destinationFactory = destinationFactory;
|
||||
}
|
||||
|
||||
public boolean isPersistent() {
|
||||
return persistent;
|
||||
}
|
||||
@ -1106,16 +1113,20 @@ public class BrokerService implements Service, Serializable {
|
||||
else {
|
||||
destinationInterceptor = createDefaultDestinationInterceptor();
|
||||
}
|
||||
|
||||
RegionBroker regionBroker = null;
|
||||
RegionBroker regionBroker = null;
|
||||
if (destinationFactory == null) {
|
||||
destinationFactory = new DestinationFactoryImpl(getMemoryManager(), getTaskRunnerFactory(), getPersistenceAdapter());
|
||||
}
|
||||
if (isUseJmx()) {
|
||||
MBeanServer mbeanServer = getManagementContext().getMBeanServer();
|
||||
regionBroker = new ManagedRegionBroker(this, mbeanServer, getBrokerObjectName(), getTaskRunnerFactory(), getMemoryManager(),
|
||||
getPersistenceAdapter(), destinationInterceptor);
|
||||
destinationFactory, destinationInterceptor);
|
||||
}
|
||||
else {
|
||||
regionBroker = new RegionBroker(this,getTaskRunnerFactory(), getMemoryManager(), getPersistenceAdapter(), destinationInterceptor);
|
||||
regionBroker = new RegionBroker(this,getTaskRunnerFactory(), getMemoryManager(), destinationFactory, destinationInterceptor);
|
||||
}
|
||||
destinationFactory.setRegionBroker(regionBroker);
|
||||
|
||||
regionBroker.setKeepDurableSubsActive(keepDurableSubsActive);
|
||||
regionBroker.setBrokerName(getBrokerName());
|
||||
return regionBroker;
|
||||
@ -1375,4 +1386,5 @@ public class BrokerService implements Service, Serializable {
|
||||
masterConnector = (MasterConnector) service;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user