From: Michael B. <mic...@li...> - 2002-09-13 17:29:49
|
Hi Adrian, Meanwhile I've considered to lookup the MBeanRegistry via the MBeanServer and registering through its service, where I can specify the Map. (I've not programmed this yet, we have a "going live" today in Hamburg which I support remotely.) Do you think this could work? (N.B.: I think your solution is preferable, unless - of course - it breaks other things. And Scott Stark want's to get out the 3.2 beta this weekend...) Regards, Michael Bartmann Adrian Brock wrote: > Hi Michael, > > I'll investigate/test the impact of the following change in the > MBeanServer. > > public ObjectInstance registerMBean(Object object, ObjectName name) > throws InstanceAlreadyExistsException, > MBeanRegistrationException, > NotCompliantMBeanException > { > - return registerMBean(object, name, (ClassLoader)null); > + ClassLoader cl = Thread.currentThread().getContextClassLoader(); > + return registerMBean(object, name, cl); > } > > It is not as simple as it looks :-) > > Regards, > Adrian > >> From: Michael Bartmann <mic...@li...> >> Reply-To: jbo...@li... >> To: jbo...@li... >> Subject: Re: [JBoss-user] JMX and ear-scope (too much "protection"?) >> Date: Fri, 13 Sep 2002 08:16:57 +0200 >> >> David Jencks wrote: >> >>> Did you look at how ServiceCreator does it? That might work for you >>> also. Basically you ask the mbeanserver to create your object >>> (sub-service) for >>> you using a specific classloader, then it remembers for you, you >>> don't need >>> to worry about the mbeanRegistry. >>> >> >> I want to _register_ (not create) an existing Service. >> >> The method I use (from MBeanServerImpl) has: >> >> public ObjectInstance registerMBean(Object object, ObjectName name) >> throws InstanceAlreadyExistsException, >> MBeanRegistrationException, >> NotCompliantMBeanException >> { >> return registerMBean(object, name, (ClassLoader)null); >> } >> >> and >> >> protected ObjectInstance registerMBean(Object object, ObjectName >> name, ClassLoader cl) >> { >> ... >> } >> >> Should it be that JBoss "denies" me the feature to register inside my >> ear-scope in a way, >> that the TCL is the right one by making things protected? >> >> Or maybe I don't think about it in the right way? >> >> Michael Bartmann >> >> >> >> ------------------------------------------------------- >> This sf.net email is sponsored by:ThinkGeek >> Welcome to geek heaven. >> http://thinkgeek.com/sf >> _______________________________________________ >> JBoss-user mailing list >> JBo...@li... >> https://lists.sourceforge.net/lists/listinfo/jboss-user > > > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > JBoss-user mailing list > JBo...@li... > https://lists.sourceforge.net/lists/listinfo/jboss-user > |