mirror of https://github.com/apache/activemq.git
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. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@661466 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1973ca8f3e
commit
6cc18cac5a
|
@ -29,6 +29,7 @@ import java.util.concurrent.Executor;
|
|||
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 abstract class TransportFactory {
|
|||
|
||||
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());
|
||||
|
|
Loading…
Reference in New Issue