RE: RequiredModelMBean

"Bordet, Simone" <[email protected]>
Newsgroups gmane.comp.java.mx4j.devel
Message-ID <F4F4494F4618794E99E59D41C5292FFD02495C88@mnoexc01.emea.cpqcorp.net>
Hi, 

> I'm looking for a way to use Mx4j's ModelMBean within another 
> JMX implementation (e.g. for
> using its persistence facility). However, since Mx4j provides 
> its ModelMBean within
> jaxax.management.modelmbean.RequiredModelMBean only, this is 
> not possible e.g. within an
> application server setup where the parent class loader always 
> 'wins' and uses the
> RequiredModelMBean provided by the AppServer (e.g. JBoss).
> 
> There would be a simple solution to this: Rename 
> 'javax.management.RequiredModelMBean' to
> something like 'mx4j.Mx4jModelMBean' and define a 
> RequiredModelMBean by extending
> Mx4jModelMBean (with no extra method). With this setup one 
> could use Mx4JModelMBean in a
> different JMX implementation without problem.
> 
> What do you think ?

That this is not possible since the JMX specification requires
RequiredModelMBean to inherit and implement from the classes and
interfaces defined by the specification.
Therefore it cannot extend MX4JModelMBean.

Given this, I take the chance to say one more time what I personally
think of ModelMBeans, and especially RequiredModelMBean: think twice
before using them. 
These classes suffer from long standing bugs in the specifications,
implementations, have incoherent behavior and even if you write
something that works in one implementation, you can bet that you change
the implementation and it will not work. They work, but hey, don't ask
for help :)

Simon


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.