use of org.glassfish.jms.admin.cli.MQJMXConnectorInfo in project Payara by payara.
the class JmsHandlers method getMBeanServerConnection.
private static MBeanServerConnection getMBeanServerConnection(String target) throws ConnectorRuntimeException, Exception {
ServiceLocator habitat = GuiUtil.getHabitat();
Domain domain = habitat.getService(Domain.class);
Cluster cluster = domain.getClusterNamed(target);
String configRef = null;
if (cluster == null) {
Server server = domain.getServerNamed(target);
configRef = server.getConfigRef();
} else {
configRef = cluster.getConfigRef();
}
PhysicalDestinations pd = new PhysicalDestinations();
MQJMXConnectorInfo mqInfo = pd.getConnectorInfo(target, configRef, habitat, domain);
return mqInfo.getMQMBeanServerConnection();
}
Aggregations