logo       

Re: Possible JMX-related Bug: msg#00160

jakarta.avalon.phoenix.devel

Subject: Re: Possible JMX-related Bug

On Fri, 18 Oct 2002 17:05, Ulrich Mayring wrote:
> Peter Donald wrote:
> > However you can do the equivelent sort of thing in phoenix by adding
> > xdoclet tags to source file and processing the source files to produce
> > .mxinfo files. These .mxinfo files will work on all MBean servers and you
> > can see the documentation at
> >
> > http://jakarta.apache.org/avalon/phoenix/mx/index.html
>
> Wow, docs... *salivate* ;-)

:)

> I think I understand how this is supposed to work, but have a few
> high-level questions:
>
> 1. Basically, there are two possibilities: tagging the source or writing
> the .mxinfo file by hand. Wouldn't it be strategically better to do the
> latter, as these .mxinfo files could be used outside of Phoenix?

yep.

> I
> introduce a Phoenix-dependency (or maybe only a xdoclet-dependency?)
> when I use the (admittedly more comfortable) source tagging. OTOH my
> apps are Phoenix-dependent anyway... any other strategic issues to
> consider?

Eventually the mxinfo stuff will be moved outside Phoenix and into baxter. We
have have a task in Bugzilla for just that ;) Just not got there yet.

> 2. Currently I use a MyClassMBean class with interfaces, which are
> implemented by MyClassImpl. Apparently this is now the "old" way to do
> JMX, does that mean by using the new way I can get rid of the
> MyClassMBean class entirely?

Personally I would still use the MyClassMBean interface and markup that file.
The reason for this is that by using JDK1.3 proxies I can later do something
like

mBean =
(MyClassMBean)MBeanInvocationHandler.
createProxy( mBeanServer,
new ObjectName( "some-name" ),
new Class[] { MyClassMBean.class } );

mBean.callMyMethod();

So it allows me to treat MBean objects just like normal objects if they
implement a service interface. Anyways see baxter for the
MBeanInvocationHandler.

> 3. Where to put the .mxinfo file in the SAR I build? In SAR-INF, next to
> config.xml et. al.?

Side by side to the class file. Same way we deal with .xinfo files.

--
Cheers,

Peter Donald
*-----------------------------------------------------*
* "Faced with the choice between changing one's mind, *
* and proving that there is no need to do so - almost *
* everyone gets busy on the proof." *
* - John Kenneth Galbraith *
*-----------------------------------------------------*


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise