It appears the attached jar file was stripped. Here's the java source.

*

import* java.util.concurrent.CountDownLatch;

*

import* javax.management.MBeanServer;
*

import* javax.management.MBeanServerBuilder;
*

import* javax.management.MBeanServerDelegate;

*

public* *class* SingletonMBeanServerBuilder *extends* MBeanServerBuilder {

*private* *static* MBeanServer *theMBeanServer*;

*private* *static* MBeanServerDelegate *theMBeanServerDelegate*;

*private* *static* *final* CountDownLatch *mbeanServerInited* =
*new*CountDownLatch(1);

*private* *static* *final* CountDownLatch *mbeanServerDelegateInited* = *new
* CountDownLatch(1);

*public* SingletonMBeanServerBuilder() {

}

@Override

*public* MBeanServer newMBeanServer(String defaultDomain,

MBeanServer outer, MBeanServerDelegate delegate) {

*return* checkAndInitMBeanServer(defaultDomain, outer, delegate);

}

@Override

*public* MBeanServerDelegate newMBeanServerDelegate() {

*return* checkAndInitMBeanServerDelegate();

}

*private* MBeanServer checkAndInitMBeanServer(String defaultDomain,

MBeanServer outer, MBeanServerDelegate delegate) {

*synchronized* (*mbeanServerInited*) {

*if* (*mbeanServerInited*.getCount() != 0) {

*theMBeanServer* = *super*.newMBeanServer(defaultDomain, outer,

delegate);

*mbeanServerInited*.countDown();

}

}

*return* *theMBeanServer*;

}

*private* MBeanServerDelegate checkAndInitMBeanServerDelegate() {

*synchronized* (*mbeanServerDelegateInited*) {

*if* (*mbeanServerDelegateInited*.getCount() != 0) {

*theMBeanServerDelegate* = *super*.newMBeanServerDelegate();

*mbeanServerDelegateInited*.countDown();

}

}

*return* *theMBeanServerDelegate*;

}

}



On Nov 14, 2007 11:52 AM, Vamsavardhana Reddy <[EMAIL PROTECTED]> wrote:

> What does the jar do?  It does not seem to contain source code.
>
> ++Vamsi
>
> On Nov 15, 2007 1:16 AM, Ramakanth Kunapuli <[EMAIL PROTECTED]> wrote:
>
> > It appears that tomcat uses different MBeanServer instance from Java's
> > platform MBeanServer.
> >
> > Here's a tech tip of making both Tomcat & Java use the same MBean Server
> > instance.
> >
> > Drop the attached jar file under <java_home>/jre/lib/ext.
> > Modify the java execution command to include the following system
> > property.
> > *
> > -Djavax.management.builder.initial=SingletonMBeanServerBuilder
> >
> >
> > *
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>

Reply via email to