• Post Reply Bookmark Topic Watch Topic
  • New Topic

JMX and JDK 1.4.2  RSS feed

 
Tom George
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Umm.. wasnt too sure where to post this, anyway.

Is it necessary that JDK5 is needed for coding mbeans using Java Management Extensions API? How to do this with JDK 1.4.2, and the versions before that?
The library package structure for jmx isn java.lang.management.*, and by conventional wisdom, the java.lang related stuff should all lie in rt.jar, right? But couldnt find this in my rt.jar in jdk1.4.2 ?

Could someone point me in the right way?
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try Sun's JMX site.
 
Henry Wong
author
Sheriff
Posts: 22852
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone point me in the right way?


It really depends on what you need to do.

If you are a client that is trying to connect to an MBean Server... Tomcat, Weblogic, JBoss, etc., all come with client side libraries that allow you to connect to it. These libraries has all the JMX classes that is supported.

If you are the server, then you are running in the mbean container that have these libraries.

Unfortunately, Java 5.0 confuses this a bit. The JDK has an mbean server built in, with mbeans that report on the JVM. However, this doesn't imply that JMX is not supported until 5.0, as you still need the client libraries to get to get to the other mbean containers.

Henry
 
Henry Wong
author
Sheriff
Posts: 22852
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, didn't really answer your other question...

In order to code mbeans, you'll need an mbean server. This means that you need to download Tomcat, JBoss, or Weblogic -- which are all available for free. Websphere is also available for free, but it is only for 60 days.

I really don't recommended upgrading to 5.0 just for the mbean server. It is not very interesting to use. JMX is a management API, and it is more interesting when there is actual stuff to manage.

Henry
 
Tom George
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Henry.

What I am trying to do is to change a few application properties at runtime without having to restart the server, and thought JMX would be a neat way of accomplishing this. And btw, I am working with a product, which means that I cannot rely on implementation specific things. ie, cannot rely on JBoss or BEA libraries, and have to work (as much as possible) with the Sun JDK itself. That was why I was asking whether JMX was supported in JDK 1.4.2 and before..

 
Henry Wong
author
Sheriff
Posts: 22852
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tom,

Writing MBeans is very similar to Servlets and EJBs... meaning...

1. You really can't develop one with just a JDK (sans Java 5.0). You actually need to choose Tomcat, JBoss, etc.

2. You need the client side libraries to get to the service. Mainly cause by the JNDI particulars.

3. You can use lightweight libraries for testing. For JMX, you can get the reference implementation from Sun.

4. It is possible to write implementation independent MBeans -- that will run in any implementation.

Henry
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!