Author: chirino
Date: Thu May 29 13:32:58 2008
New Revision: 661466

URL: http://svn.apache.org/viewvc?rev=661466&view=rev
Log:
Putting back setting the broker service on transport factories that implement 
BrokerServiceAware.  Removing that had broken the StompTest.
It's a little dirty cause it can cause issues if 2 brokers are created in 1 jvm.


Modified:
    
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java

Modified: 
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java
URL: 
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java?rev=661466&r1=661465&r2=661466&view=diff
==============================================================================
--- 
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java
 (original)
+++ 
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java
 Thu May 29 13:32:58 2008
@@ -29,6 +29,7 @@
 import javax.net.ssl.SSLContext;
 
 import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.BrokerServiceAware;
 import org.apache.activemq.broker.SslContext;
 import org.apache.activemq.util.FactoryFinder;
 import org.apache.activemq.util.IOExceptionSupport;
@@ -119,6 +120,9 @@
     
     public static TransportServer bind(BrokerService brokerService, URI 
location) throws IOException {
         TransportFactory tf = findTransportFactory(location);
+        if( brokerService!=null && tf instanceof BrokerServiceAware ) {
+            ((BrokerServiceAware)tf).setBrokerService(brokerService);
+        }
         try {
             if( brokerService!=null ) {
                 SslContext.setCurrentSslContext(brokerService.getSslContext());


Reply via email to