Announcement Announcement Module
Collapse
No announcement yet.
JMX in desktop application Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMX in desktop application

    Hi all,
    I am developing application for drawing star charts. It have two parts: engine which can run standalone and GUI. Application is already using Spring beans.

    I need way to configure engine behaviour. It must work in various situations including command line, J2EE container and desktop application. JMX is propably good choice. I want to use JMX as configuration protocol between GUI and engine.

    I read Sun and Spring documentation, but few things are not clear to me:

    1) Is it possible to persist changes made by JMX when JVM terminates?

    2) All samples shows only changing of trivial values as method parameters (strings, numbers...). Can normal object be used as method parameter? Is it possible inject another implementation to existing bean with JMX?

    3) Is there any known use of JMX in desktop application?

    Thanks for reply

  • #2
    Originally posted by opencoeli View Post
    1) Is it possible to persist changes made by JMX when JVM terminates?
    It's not part of the JMX server specification. You would have to commit the values yourself (e.g. in an AOP layer in front of the real service).

    2) All samples shows only changing of trivial values as method parameters (strings, numbers...). Can normal object be used as method parameter? Is it possible inject another implementation to existing bean with JMX?
    Since it is basically a remote protocol, you can use complex parameters if they are Serializable from a program (e.g. a scripted interaction with the application). To use the common console applications (e.g. jconsole) you have to write your own wrappers that take primitive or "trivial" method parameters and unmarshall them into the correct target type.

    3) Is there any known use of JMX in desktop application?
    It's not common (if by "desktop" you mean rich client). JMX is mainly for remote management - if you control the client implementation it would be fairly easy to provide the same function locally.

    Comment


    • #3
      Thanks

      Thanks for reply,
      For record: I decided to use simple memento pattern in my application. Engine can be configured with GUI, but config file would be compatible with Server, CLI whotewer version. Restart is needed to change configuration.
      JMX is overkill for this.

      Comment

      Working...
      X