An object that is able to return connections to a given MBeanServer. The MBeanServer could be local ( {@link LocalMBeanServerConnectionFactory}) or remote ( {@link BasicMBeanServerConnectionFactory}).
Implementations of the {@link MBeanServerConnectionFactory} may or maynot support transparent reconnection when the underlying connection is abruptly closed (server going down, network failure, etc...). Whether transparent reconnection is supported or not should be transparent to the client code.
If transparent reconnection is supported, then the {@link MBeanServerConnectionFactory} implementation is responsible fortransparently initiating a new connection with the server side, by, e.g, obtaining a new JMXConnector
from a lookup service.
The {@link MBeanServerConnectionFactory} emits {@link JMXConnectionNotification} relating to the underlying connection:
- {@link JMXConnectionNotification#OPENED}: The connection with the underlying MBeanServer was (re)opened.
- {@link JMXConnectionNotification#CLOSED}: The connection with the underlying MBeanServer was closed.
- {@link JMXConnectionNotification#FAILED}: The connection with the underlying MBeanServer failed - and can no longer be used.
Implementations that support transparent reconnection could only emit {@link JMXConnectionNotification#OPENED} and {@link JMXConnectionNotification#CLOSED} notifications.Implementations that do not support transparent reconnection could emit all three notifications. An implementation providing connections to a local MBeanServer could emit none of them.
@since Java DMK 5.1