activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r438994 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Date Thu, 31 Aug 2006 17:32:02 GMT
Author: rajdavies
Date: Thu Aug 31 10:32:02 2006
New Revision: 438994

URL: http://svn.apache.org/viewvc?rev=438994&view=rev
Log: (empty)

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=438994&r1=438993&r2=438994&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
Thu Aug 31 10:32:02 2006
@@ -34,6 +34,8 @@
 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 @@
     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 @@
         this.persistenceFactory = persistenceFactory;
     }
 
+    public void setDestinationFactory(DestinationFactory destinationFactory) {
+        this.destinationFactory = destinationFactory;
+    }
+
     public boolean isPersistent() {
         return persistent;
     }
@@ -1106,16 +1113,20 @@
         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 @@
             masterConnector = (MasterConnector) service;
         }
     }
+   
 }



Mime
View raw message