SpringSource/spring-integration — pull request #862 by garyrussell (2013-08-31 15:05:48+00:00)
Title: INT-3125 Fix Handler MBean Names Within Chains

Some handlers get a componentName, but not a beanName. For example
the TransformerFactoryBean may create a Transformer that's not
a bean, to wrap a POJO, or expression. The AbstractSimpleMessageHandlerFactoryBean
transfers the component name to the transformer but it has a null
beanName. It would not be appropriate for the FB to change the bean
name because, the transformer may have been a bean.

The IntegrationMBeanExporter's fallback when it can't find the handler
as part of a stand-alone endpoint is to use the handler's toString().

IntegrationObjectSupport (IOS) toString delegates to Object.toString()
if there is no beanName.

IOS's getComponentName() delegates to the beanName if there is no
component name.

Change the IMBE to use the componentName as the first fallback and,
if null, fallback to the current fallback.

One side effect is that current handlers that do have a bean name
will no longer have '.handler' at the end of their name; but this
is not really an issue because the MBean designated as a
handler anyway (via the bean component of the ObjectName).

However, identifying chain components is new in 3.0 so this is
not really a breaking change.