NO-JIRA avoiding a NPE if the server is stopped
This commit is contained in:
parent
3e4d65e14c
commit
77989c3763
|
@ -550,7 +550,10 @@ public class ManagementServiceImpl implements ManagementService {
|
|||
@Override
|
||||
public void activated() {
|
||||
try {
|
||||
messagingServer.addAddressInfo(new AddressInfo(managementNotificationAddress, RoutingType.MULTICAST));
|
||||
ActiveMQServer usedServer = messagingServer;
|
||||
if (usedServer != null) {
|
||||
usedServer.addAddressInfo(new AddressInfo(managementNotificationAddress, RoutingType.MULTICAST));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ActiveMQServerLogger.LOGGER.unableToCreateManagementNotificationAddress(managementNotificationAddress, e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue