MBean classloading in Sun Java Application Server 9.0

Hi,

I am having a classloading issue when attempting to register my custom MBeans within the Sun Java Application Server 9.0 environment.

The instructions say I can put either my classes or a Jar archive in domain_dir/applications/mbeans. When I put just the class files there it works fine. However, when I attempt to Jar those same class files (properly I might add) and put that Jar there it fails to find the mbean classes.

Does anyone know anything about this?

Thanks for any help.

[517 byte] By [bkatnicha] at [2007-11-26 20:38:58]
# 1

Hi bkatnich,

The idea was that of simple MBeans should be "deployable" (using asadmin create-mbean command, or admin GUI) . So, the classes would go to

<domain-folder>/applications/mbeans.

But if you have a jar file, the place to put the jar file is "install-dir/lib", and

restart the server.

The former is for dynamic deployment, the latter for more permanent use.

If you place the jar file in applications/mbeans, then it will not be used.

Where was it documented? I will correct it.

Regards.

Kedar

(BTW, can you let me know what you think of custom MBean feature in

app server 9.0?)

kedar.mhaswadea at 2007-7-10 1:56:12 > top of Java-index,Core,Monitoring & Management...
# 2

Hi Kedar,

Thanks for the reply. Yes, I finally figured it out.

The custom MBeans seem to work well for the most part though I don't know for sure if I'm using them in the way they were really intended.

Basically, I want to run 'services' on my application server for the lifetime of the server. I want these 'services' to maintain things like runtime caching of information over time that is not persisted in a DB but needs to be kept around in active memory to be used at a later time, but only while the application server is up and running.

Another thing I would like to do is have them receive JMS notifications directly, but I seem to be having trouble when subscribing as a consumer within my custom MBean. The topic thread on that is here:

http://forum.java.sun.com/thread.jspa?threadID=5153124&tstart=0

bkatnicha at 2007-7-10 1:56:12 > top of Java-index,Core,Monitoring & Management...