Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-2665

JMX channel adapters should work with the MBeanServerConnection super-interface.

    XMLWordPrintable

    Details

      Description

      Currently channel adapters like o.s.i.jmx.AttributePollingMessageSource and o.s.i.jmx.NotificationListeningMessageProducer have javax.management.MBeanServer as the property on whose methods are called.

      However, when connecting to a remote JMX Agent, the object returned implements the javax.management.MBeanServerConnection interface, and is not directly compatible with the sub-interface used.

      From most instances, this doesn't seem to matter, as the calls on the MBeanServer are those which are inherited from the super-interface, not specific to the sub-interface (like instantiate() or the classLoader getters).

      As is mentioned in the forum link (attached to this issue), the consideration is that the sub-interface is narrowed by the lack of IOException being thrown. However, calls to MBeanServer, just catch Exception. Hopefully, this makes life easier, unless there's some specific consideration required in handling the IOException separately.

      A current workaround, is to write a proxy which implements the MBeanServer interface, but delegates to a MBeanServerConnection underneath. However, this is not a small chunk of work.

      Thanks.

        Attachments

          Activity

            People

            Assignee:
            grussell Gary Russell
            Reporter:
            skormos Spencer Kormos
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: