ARTEMIS-4804 & ARTEMIS-4805 mitigate NPEs in ScaleDownHandler
This commit is contained in:
parent
ec8026e4d6
commit
8b265f4625
|
@ -240,4 +240,7 @@ public interface ActiveMQClientMessageBundle {
|
|||
|
||||
@Message(id = 219068, value = "Connection closed while receiving cluster topology. Group:{}")
|
||||
ActiveMQObjectClosedException connectionClosedOnReceiveTopology(DiscoveryGroup discoveryGroup);
|
||||
|
||||
@Message(id = 219069, value = "Unable to create Session. Either the ClientSessionFactory is closed or the ClientProtocolManager is dead.")
|
||||
IllegalStateException unableToCreateSession();
|
||||
}
|
||||
|
|
|
@ -846,7 +846,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
synchronized (sessions) {
|
||||
if (closed || !clientProtocolManager.isAlive()) {
|
||||
session.close();
|
||||
return null;
|
||||
throw ActiveMQClientMessageBundle.BUNDLE.unableToCreateSession();
|
||||
}
|
||||
sessions.add(session);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue