This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj & JMX


Andrew John Hughes writes:
 > On Wed, 2007-02-14 at 18:14 +0000, Andrew Haley wrote:
 >  > > 
 > > With Classpath, none of this ever happens.  Instead,
 > > gnu.javax.management.registerMBean(Object, ObjectName) does not call
 > > MBeanRegistration.preRegister() unless ObjectName == null.
 > > 
 > > So, the preRegister method is never called.
 > > 
 > > The spec for MBeanServer.registerMBean() says "If the object name
 > > given is null, the MBean must provide its own name by implementing the
 > > MBeanRegistration interface and returning the name from the
 > > preRegister method."
 > > 
 > > I suspect, however, that if the MBean is implements the
 > > MBeanRegistration interface we should call the preRegister method
 > > regardless.
 > > 
 > > I'm going to try it.
 > 
 > Sounds good to me; I hope this fixes the problem.  Maybe I shouldn't
 > stick to the specs and just go with common sense in future... ;)

Maybe, although the spec doesn't actually say that regstration should
only be done if there is no name, it just very strongly implies it.
:-)

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]