|
From: Rod J. <rod...@in...> - 2003-12-06 17:37:50
|
Colin, Why don't you check it into the sandbox? I've also been thinking about a contrib area...it would be good to have some way of sharing code that may or may not ever make it into Spring proper--for example, code useful to a lot of users, but not really a part of the framework. Regards, Rod ----- Original Message ----- From: "Colin Sampaleanu" <col...@ex...> To: <spr...@li...> Sent: Saturday, December 06, 2003 5:35 PM Subject: Re: [Springframework-developer] Spring & JMX > I have some code (donated by a friend), which can automatically expose > beans in a Spring context via BeanPostProcessor. It's pretty simplistic, > but I can also post that here if anybody wants to look at it... > > > Rob Butler wrote: > > >Looks pretty good initially. I'll take a better look at the links later and > >have more feedback then. > > > >Later > >Rob > >----- Original Message ----- > >From: "Ivan Ristic" <iv...@we...> > >To: <spr...@li...> > >Sent: Saturday, December 06, 2003 12:10 PM > >Subject: Re: [Springframework-developer] Spring & JMX > > > > > > > > > >>>>2) Expose normal beans as JMX MBeans. This would allow any bean to > >>>> be manipulated through the JMX protocol. This is also easy to do > >>>> although there is more work involved. > >>>> > >>>> > >>>Actually, I think this can be a lot less work if done right > >>> > >>> > >> It is a lot easier than I thought: > >> > >> There is an Jakarta Commons package called Modeler > >> (http://jakarta.apache.org/commons/modeler.html) that uses an > >> XML definition file and exposes plain beans as managed beans. This > >> is how it looks like: > >> > >>----------------- > >><mbeans-descriptors> > >> > >><mbean name="redBean" description="Red Bean" type="Bean"> > >> <attribute name="color" description="The color of the bean" > >> type="java.lang.String" /> > >></mbean> > >> > >><!-- the same class but expose two attributes instead of one --> > >><mbean name="bean" description="Blue Bean" type="Bean"> > >> <attribute name="color" description="The color of the bean" > >> type="java.lang.String" /> > >> > >> <attribute name="name" description="The name of the bean" > >> type="java.lang.String" /> > >></mbean> > >> > >></mbeans-descriptors> > >>----------------- > >> > >> Therefore all one needs to do is: > >> > >> 1) Prepare an XML definition file specifying for each bean which > >> attributes and methods to expose. > >> > >> 2) List the beans in an application context, and create > >> managed beans using the definition file. > >> > >> Here's a link to the ONLamp article explaining how the > >> Modeler is used: > >> > >> http://www.onjava.com/pub/a/onjava/2003/07/09/commons.html > >> > >> This Eclipse JMX plugin seems to work all right > >> http://www.xtremej.com/ and you can use it to remotely connect to > >> the exposed beans, get/set attributes and invoke methods. > >> > >> Spring could supply an abstract helper class for JMX > >> integration (AbstractJMXBridge). The class would need to be subclassed > >> to provide a method to create the JMX-related stuff (create the > >> MBeanServer, and configure it). > >> > >> Thoughts? > >> > >>-- > >>ModSecurity (http://www.modsecurity.org) > >>[ Open source IDS for Web applications ] > >> > >> > >> > >>------------------------------------------------------- > >>This SF.net email is sponsored by: IBM Linux Tutorials. > >>Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > >>Free Linux Tutorials. Learn everything from the bash shell to sys admin. > >>Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > >>_______________________________________________ > >>Springframework-developer mailing list > >>Spr...@li... > >>https://lists.sourceforge.net/lists/listinfo/springframework-developer > >> > >> > > > > > > > >------------------------------------------------------- > >This SF.net email is sponsored by: IBM Linux Tutorials. > >Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > >Free Linux Tutorials. Learn everything from the bash shell to sys admin. > >Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > >_______________________________________________ > >Springframework-developer mailing list > >Spr...@li... > >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |