INT-3330 EnableIntegrationMBeanExport Annotation

JIRA: https://jira.spring.io/browse/INT-3330

INT-3330: Enable SpEL evaluation

INT-3330: Polishing for `MBeanExporterHelper`

INT-3330: Fix `errorChannel` early access

INT-3330: Polishing according PR comments

Polishing - copyrights, author, docs
This commit is contained in:
Artem Bilan
2014-03-18 20:57:36 +02:00
committed by Gary Russell
parent 1d6e80ecd0
commit 97c270c0e2
23 changed files with 643 additions and 196 deletions

View File

@@ -140,12 +140,12 @@
<section id="tree-polling-channel-adapter">
<title>Tree Polling Channel Adapter</title>
<para>
The <emphasis>Tree Polling Channel Adapter</emphasis> queries the JMX MBean tree and
sends a message with a payload that is the graph of objects that matches the query. By
default the MBeans are mapped to primitives and simple Objects like Map, List and arrays -
permitting simple transformation, for example, to JSON. An MBeanServer reference is also
required, but it will automatically check for a bean named <emphasis>mbeanServer</emphasis>
by default, just like the <emphasis>Notification-listening Channel Adapter</emphasis>
The <emphasis>Tree Polling Channel Adapter</emphasis> queries the JMX MBean tree and
sends a message with a payload that is the graph of objects that matches the query. By
default the MBeans are mapped to primitives and simple Objects like Map, List and arrays -
permitting simple transformation, for example, to JSON. An MBeanServer reference is also
required, but it will automatically check for a bean named <emphasis>mbeanServer</emphasis>
by default, just like the <emphasis>Notification-listening Channel Adapter</emphasis>
described above. A basic configuration would be:
</para>
<programlisting language="xml"><![CDATA[<int-jmx:tree-polling-channel-adapter id="adapter"
@@ -277,7 +277,27 @@
It also has a useful operation, as discussed in <xref linkend="jmx-mbean-shutdown"/>.
</para>
</important>
<para>
Starting with <emphasis>Spring Integration 4.0</emphasis> the <code>@EnableIntegrationMBeanExport</code>
annotation has been introduced for convenient configuration of a default
(<code>integrationMbeanExporter</code>) bean of type
<classname>IntegrationMBeanExporter</classname> with several useful options
at the <code>@Configuration</code> class level. For example:
<programlisting language="java"><![CDATA[@Configuration
@EnableIntegration
@EnableIntegrationMBeanExport(server = "mbeanServer", managedComponents = "input")
public class ContextConfiguration {
@Bean
public MBeanServerFactoryBean mbeanServer() {
return new MBeanServerFactoryBean();
}
}]]></programlisting>
If there is a need to provide more options, or have several <classname>IntegrationMBeanExporter</classname> beans
e.g. for different MBean Servers, or to avoid conflicts with the standard Spring <classname>MBeanExporter</classname>
(e.g. via <code>@EnableMBeanExport</code>), you can simply configure an <classname>IntegrationMBeanExporter</classname>
as a generic bean.
</para>
<section id="jmx-mbean-features">
<title>MBean ObjectNames</title>

View File

@@ -94,6 +94,13 @@
For more information, see <xref linkend="redis-cms"/>.
</para>
</section>
<section id="4.0-MBeanExport-annotation">
<title>@EnableIntegrationMBeanExport</title>
<para>
The <classname>IntegrationMBeanExporter</classname> can now be enabled with the <code>@EnableIntegrationMBeanExport</code>
annotation in a <code>@Configuration</code> class. For more information, see <xref linkend="jmx-mbean-exporter"/>.
</para>
</section>
</section>
<section id="4.0-general">