Announcement Announcement Module
No announcement yet.
"Drill down" into custom class properties Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • "Drill down" into custom class properties

    I have forced cglib proxies for my MBeans since my setters invoke Spring AOP functionality on some base class methods. So now when I set a property from either a JMX client, or the application the client monitors, the other is notified. (Synchronization of updated values in the client is another annoying issue though).
    My problem is that when I try to "drill down" into an MBean attribute, which itself is another Spring/JMX managed type, I receive a cglib2 Serialization error. My relevant classes are Serializable. A JMX client like JConsole or eclipse-jmx is of limited utility if one cannot start with a single class that it is complex composition of other JMX-ed Spring beans, and keep drilling down. The only requirements to be able to do this are supposed to be Serializability and availability of the defined classes to the JMX client, but this still results in the cglib serialization error. Does anyone know how to solve this problem?
    Last edited by bscipioni; Mar 10th, 2008, 02:43 AM.

  • #2
    Drilling Down into Custom Class Properties

    To do what you want to do, I think you will need to pursue one of two options:
    1. "Wrap" the related classes in single MBean that exposes the higher level behavior and the drilled-down behavior.
    2. Consider using the lightly-documented and relatively complex JMX Relation Service.


    • #3
      Thanks. I was aware of the JMX Relation service, but hoped I didn't have to go to that level of complexity.

      As an example, look at jconsole as a client app for the Platform MBean Server. If you, for example, double-click an Attribute which is a non-simple type, like the Garbage Collector's PS MarkSweep MBean, it expands into its Attributes and so on. But I have noticed, in every case, the clickable Attribute is either an Open MBean, or an Array of a builtin type (int[] or String[]). I guess that is what I need to do. However, I would STILL have the problem of my MBeans being CGLIB2 Proxies - that is the real problem. An older reference to this issue (for serializing Objects for web access) are the comments by Spring Team Member Rod Johnson:

      Is this still a valid point?

      Perhaps what I need is a serialiable replacement for CGLIB Proxies:

      Comments anyone?