• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMX and JDK 1.4.2

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try Sun's JMX site.
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic