Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Without knowing too much about JMX, I've always assumed that it would be the best approach for building in remote management to our standalone Java server application. Our server application has some minimal remote control capability, using text commands sent via TCP/IP socket to it.

Using the home grown approach, it is fairly to add a new command. (Just create new command text, and the code to handle that in the message receiver). On the other hand, we have hardly implemented any commands, even though there are many things we would like to be able to execute remotely.

I am trying to weigh the value of moving to incorporating JMX (learning it, and building the interfaces), versus just sticking with the home-grown approach. Does anyone have any experience or advice regarding changing an existing application to use JMX?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Good question.

First of all answer is quite simple for me. Move to JMX for several reasons.

  1. There are lots of stable proven JMX implementations out there that you can simply use to bootstrap your application and you don't really have to maintain your code to be able to support different operations.
  2. JMX is a very simple model where you have MBeanServer that hosts a bunch of services / MBeans that have properties and methods.
  3. These services / MBean are exposed by MBeanServer in a protocol agnostic way.
  4. If there is a need to connect to the MBeanServer using different protocol's its simply a matter of creating adapters.

To answer your other question, is it easy to migrate to JMX, the answer is it all depends. If fairly easy to migrate the implementations / services to MBean and expose only what you want to but the tricky part maybe how you connect to those services. So clients might have to rewrite some of the code.

Hope this help!

Good luck.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.