Package dk.netarkivet.common.management
Class MBeanConnectorCreator
- java.lang.Object
-
- dk.netarkivet.common.management.MBeanConnectorCreator
-
public class MBeanConnectorCreator extends Object
Utility class that handles exposing the platform mbean server using rmi, and using specified ports and password files.
See http://java.sun.com/j2se/1.5.0/docs/guide/jmx/tutorial/security.html
TODO This implementation is not robust and could be improved.
TODO For instance: - Singleton behaviour
TODO -Reuse of already created registry
TODO Usage of access rights (for read-only mbeans) (see reference above)
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
isExposed
-
Constructor Summary
Constructors Constructor Description MBeanConnectorCreator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
exposeJMXMBeanServer()
Registers an RMI connector to the local mbean server in a private RMI registry, under the name "jmxrmi".
-
-
-
Method Detail
-
exposeJMXMBeanServer
public static void exposeJMXMBeanServer()
Registers an RMI connector to the local mbean server in a private RMI registry, under the name "jmxrmi". The port for the registry is read from settings, and the RMI port used for exposing the connector is also read from settings. Access to the mbean server is restricted by the rules set in the password file, likewise read from settings.- Throws:
IOFailure
- on trouble exposing the server.
-
-