• Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom JMX Connectors  RSS feed

 
Yohan Liyanage
Ranch Hand
Posts: 132
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone know any resource that could be helpful in writing a custom JMX Connector? (ex, like a HTTP Connector for JMX, instead of standard RMI Connector).

Thanks.
 
Henry Wong
author
Sheriff
Posts: 22853
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Yohan Liyanage:
Anyone know any resource that could be helpful in writing a custom JMX Connector? (ex, like a HTTP Connector for JMX, instead of standard RMI Connector).

Thanks.


Question: Why would you want an http connector? Is there a reason why the standard RMI connector is not acceptable?


If you just want a more simpler protocol, then you can try the JMXRP connector. It isn't supported in some JMX containers, but if you absolutely need it... It is simpler in that you don't need a registry to get to it.

If you just want a "connector" so that you take a look at it from a web browser. Then technically, this isn't a connector as it doesn't return an mbean server connector interface. However, it is available -- but I think it is called an adapter. You can add the http adapter to the mbean server, then you can view the contents of the container via a web browser.

Henry
 
Yohan Liyanage
Ranch Hand
Posts: 132
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to write a connector(not adapter) which allows me to use SOAP as the communication medium between deployed MBeans and the MBeanServer. RMI cannot work over firewalls which limits the reachability of JMX.

MX4J has a implementation which uses SOAP, but I want to write my own one for learning, and I couldn't find any helpful information so far.
 
Henry Wong
author
Sheriff
Posts: 22853
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting, there doesn't seem to be any way to register your own connector to the JMX connector factory. Not that it is important. Since you need a special service URL anyway, you client code can be written to not use the factory, but instantiate you connector directly.

For the connector (server side), just write it as an mbean, which has full access to the mbean server -- and handles the protocol stuff simultaneously. You have to implement the protocol yourself as it is not defined anywhere.

For the connector (client side), just implement the connector interface, and use the connection to the server side, via the your protocol, to make the mbean requests.

On the server side, your connector is simply a network server that uses your own protocol, that routes the requests to the mbean server. On the client side, your connector is simply an object that implements the connector interface that makes requests to you jmx connector.

Henry
 
Yohan Liyanage
Ranch Hand
Posts: 132
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Henry. That will get me going on.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!