User: juhalindfors Date: 02/01/23 13:57:49 Modified: src/main/org/jboss/mx/server MBeanServerImpl.java Log: print stack trace if error or exception stops MBean registration Revision Changes Path 1.8 +15 -14 jmx/src/main/org/jboss/mx/server/MBeanServerImpl.java Index: MBeanServerImpl.java =================================================================== RCS file: /cvsroot/jboss/jmx/src/main/org/jboss/mx/server/MBeanServerImpl.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- MBeanServerImpl.java 2002/01/12 20:10:53 1.7 +++ MBeanServerImpl.java 2002/01/23 21:57:49 1.8 @@ -55,22 +55,21 @@ * @see javax.management.MBeanServer * * @author <a href="mailto:[EMAIL PROTECTED]">Juha Lindfors</a>. - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ */ -public class MBeanServerImpl implements MBeanServer +public class MBeanServerImpl implements MBeanServer, ServerConstants { - public final static String MBEAN_SERVER_DELEGATE = "JMImplementation:type=MBeanServerDelegate"; - protected static long registrationNotificationSequence = 1; - protected static long unregistrationNotificationSequence = 1; + // Attributes ---------------------------------------------------- + protected long registrationNotificationSequence = 1; + protected long unregistrationNotificationSequence = 1; + protected String defaultDomain = "DefaultDomain"; + protected MBeanRegistry registry = null; + protected MBeanServerDelegate delegate = null; - protected String defaultDomain = "DefaultDomain"; - protected MBeanRegistry registry = null; - protected MBeanServerDelegate delegate = null; - + // Constructors -------------------------------------------------- public MBeanServerImpl(String defaultDomain) { - this.defaultDomain = defaultDomain; this.registry = new BasicMBeanRegistry(); this.delegate = new MBeanServerDelegate(); @@ -96,8 +95,8 @@ throw new Error("MBean Server Delegate is not a compliant MBean"); } } - + // MBeanServer implementation ------------------------------------ public Object instantiate(String className) throws ReflectionException, MBeanException { try @@ -312,6 +311,9 @@ } catch (Throwable t) { + // FIXME: logging + System.out.println("Registration Failed:"); + t.printStackTrace(); registrationDone = false; } } @@ -353,11 +355,9 @@ ); } - if (registrationInterface != null) registrationInterface.postRegister(new Boolean(registrationDone)); - return (registrationDone) ? new ObjectInstance(name, entry.getResourceClassName()) : null; @@ -580,8 +580,8 @@ throw new OperationsException("I/O exception deserializing: " + e.getMessage()); } } - + // Protected ----------------------------------------------------- protected int getMBeanType(Object object) { @@ -612,6 +612,7 @@ return type; } + // Private ------------------------------------------------------- private static int DYNAMIC_MBEAN = 0x321; private static int STANDARD_MBEAN = 0x123; private static int NOT_AN_MBEAN = 0xc0de;
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development