Hi all,
I recently had to dive quite deep into the Camel JMX annotations and
their implementation. In fact much deeper then I had wanted :-)
The problem was that I needed to find a way to send notifications from
an MBean.
There are two very different implementation right now:
1) The old way: Using spring JMX annotations and the spring libs
2) The new way in camel 2.9+ : Using the new Camel JMX annotations and
the camel MBeanAssembler
The spring implementations had a quite solid implementation but they
made camel dependent on the spring libs. So Claus created camel
annotations that look like the spring ones and implemented the basic
functionality. The JMX Notification support was not yet implemented so I
added it for 2.9 but I am not sure if it is a good way to do this in
camel at all.
The problem here is that our implementation is not as complete as the
spring one and I am not sure if it is a good idea to do a generic JMX
support lib in camel. After all camel is not about JMX in it´s core. In
my backport to 2.8.2 I had to use the original Java JMX (MXBeans) to
avoid adding a spring dependency. When doing the code I saw that it is
some more work than with annotations but not really much.
So I see two good ways to continue with JMX in camel..
1) Simply go the standard java way (Using e.g. MXBeans). Like said it is
a bit more work but it is the Java way so everyone who knows JMX will
understand what we do
2) Create a separate project for the JMX support in apache commons. So
other projects can benefit from it and there is a chance to make this
really good
Honestly I would prefer 1) for it´s simplicity and as it lowers the
complexity of camel by using one less framework.
Christian
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com