Announcement Announcement Module
No announcement yet.
JMX channels adapters should use MBeanServerConnection super interface. Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMX channels adapters should use MBeanServerConnection super interface.

    All the channel adapter implementations for the integration.jmx rely on MBeanServer, instead of MBeanServerConnection, which is the MBeanServer super-interface.

    From what I can tell, there's no reason for this, and it prevents easy integration with a remote connection to a JMX Agent, which is handled by an implementation of the super-interface not compatible with MBeanServer.

    Anyone know why the sub-interface MBeanServer was chosen, and not the Connection super-interface for these classes?

    Is this something I can open a bug for, for a future version of the integration library?

  • #2
    Probably just an oversight; it looks like we are only using methods that appear on both interfaces. However, it's not as simple as just changing the declaration because many of the MBeanServer methods narrow the interface, in that they don't throw the IOExceptions that the super interface does.

    Still not a heavy-lift, though.

    Feel free to open an 'Improvement' JIRA issue here
    Last edited by Gary Russell; Jul 11th, 2012, 12:09 PM.


    • #3
      Thank you for the quick response.

      I appreciate that the interface is narrowed, in most instances of the channel adapter (I didn't look through all of them), it seems that the pertinent calls to the interface just catch Exception. So hopefully it will be an even lighter lift.

      I was mostly worried that there was some other consideration taken into account because of the local v. remote intent of the two interfaces, though that doesn't seem to be the case.

      I'll definitely open the JIRA item.

      Thanks again.