Re: Comparision JMX Spring
Quote:
Originally Posted by umeshs79
Now I have many doubts regarding using Spring framework in my application. Like I feel that we can do the same things using JMX and decouple objects and can make them configurable at runtime... If I use my mbeans with Spring framework, it seems There will be overhead of configuration with Spring framework.
As far as I know, you need to configure your JBoss MBeans using a jboss-service.xml. So I don't think you are adding any additional work, you are simply trading one configuration task for another.
Quote:
So can you help me to compare JMX mbeans with spring beans OR redirect to a good article where JMX and Spring framework comparisons is discussed.
There should be no difference between the MBeans deployed using JBoss and Spring. The question is, do you find it convenient to develop your MBeans as POJOs?
As you've no doubt noticed by now, attribute and operation invocations are a pain in the ass on regular MBeans. On the other hand, such invocations on POJOs are incredibly simple. If you are going to want to do any programmatic invocations on your MBeans (or may in the future), you should look at Spring JMX configuration.
I worked on one large JBoss application for a couple of years, and as the application requirements and architecture evolved over time, I found that sometimes we decided to change non-JMX components into JMX components and vice-versa. This, too, was a pain in the ass. I would have killed to accomplish this with a simple configuration file change rather than making extensive error-prone source changes. Once again, an advantage of Spring JMX configuration.