Hi!

Aaron Mulder wrote:
>         I'm looking at creating an MBean to initialize a connection pool.
> Rickard mentioned the ServiceMBean class, which I took a look at.  If I
> were to use that, that would tie the classes to jBoss.  

Correct.

> So I wonder
> whether that's truly necessary.  What would happen if the pool used a
> generic MBean?  It seems like it would still be loaded, but would it fail
> to unload or something?
>         If it does need to extend ServiceMBeanSupport, perhaps the correct
> approach would be to put the MBeans under the jBoss packages even if the
> pools themselves are not.

Two options: 
* make your MBean part of the pools (the management part) so that they
don't use the Service* classes. The only they really do is *mandate*
that the methods init/start/stop/destroy are available. If you do this
manually that's ok as well.

* As you suggest (and as I have described to you in private email),
split the pools into parts where the administration of the pool could be
jBoss specific, but the pools not. If you do things the right way you
should be able to add another administration part of it to glue it to
whatever use you want. The key to this is to make the pools themselves
simple JavaBeans with no expectations at all on the surrounding
environment. The glue between configuration and the pools should be made
in the admin classes.

IMHO the second option is preferred. Less job and more "pure" :-)

/Rickard

-- 
Rickard �berg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com

Reply via email to