Caldarale, Charles R wrote:
From: Emmanuel Soden [mailto:[EMAIL PROTECTED]
Subject: Re: [JMX] org.apache.catalina.session.StandardManager not serializable

Using Tomcat 5.5.27 with JDK 1.5.0_11, I'm trying to retrieve
the attribute "manager" from the MBean
"Catalina:J2EEApplication=none,J2EEServer=none,
j2eeType=WebModule,name=//localhost/".
I don't think there's any requirement for any app to guarantee that attributes 
are serializable, and I suspect trying to make StandardManager so would create 
a host of issues inside Tomcat.

Perhaps you should try retrieving the attributes you're interested in from this 
JMX location instead:
  "Catalina:type=Manager,path=/,host=localhost"
Its attributes are all retrievable, at least according to JConsole
when I try to retrieve an attribute like "managedResource"
from the MBean "Catalina:host=localhost,type=Host"

>From a brief perusal of the 6.0 code (sorry, not the level you're using), there appears 
to be extremely limited use of the "managedResource" attribute, despite its 
presence in most of the MBeans.  Looks like in the vast majority of cases, the attribute is 
never set.
More generally I have had cases where I've had an attribute exposed via JMX for /in-process /usage that then blows chunks with out-of-process usage. This should be avoided, but where it cannot be it should be documented as "the way things are" and possibly addressed by replaceObject(). [In my recent case I used replaceObject() to replace my non-serializable data with an approximation thereof whose toString() would show something somewhat meaningful in a remote JMX console.]

--
Jess Holle

Reply via email to