mirror of https://github.com/apache/activemq.git
fixed failing MBeanTest due to my bad refactoring :)
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@426160 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1bd8c0b47f
commit
1a070b7a23
|
@ -179,8 +179,29 @@ public class BrokerView implements BrokerViewMBean {
|
|||
broker.removeSubscription(context, info);
|
||||
}
|
||||
|
||||
static public ConnectionContext getConnectionContext(Broker broker) {
|
||||
return broker.getAdminConnectionContext();
|
||||
|
||||
/**
|
||||
* Returns the broker's administration connection context used for configuring the broker
|
||||
* at startup
|
||||
*/
|
||||
public static ConnectionContext getConnectionContext(Broker broker) {
|
||||
ConnectionContext adminConnectionContext = broker.getAdminConnectionContext();
|
||||
if (adminConnectionContext == null) {
|
||||
adminConnectionContext = createAdminConnectionContext(broker);
|
||||
broker.setAdminConnectionContext(adminConnectionContext);
|
||||
}
|
||||
return adminConnectionContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory method to create the new administration connection context object.
|
||||
* Note this method is here rather than inside a default broker implementation to
|
||||
* ensure that the broker reference inside it is the outer most interceptor
|
||||
*/
|
||||
protected static ConnectionContext createAdminConnectionContext(Broker broker) {
|
||||
ConnectionContext context = new ConnectionContext();
|
||||
context.setBroker(broker);
|
||||
return context;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue