Bugs item #1051275, was opened at 2004-10-20 23:30
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1051275&group_id=22866
Category: JBossWeb
Group: v4.0
Status: Open
Resolution: None
Priority: 5
Submitted By: Scott M Stark (starksm)
Assigned to: Nobody/Anonymous (nobody)
Summary: tomcat uses wrong MBeanserver for Host mbean
Initial Comment:
When using java5 and -Dcom.sun.management.jmxremote to
setup the jmx monitor, the top level mbeans created by
tomcat use the default MBeanServer which is not that of
the tomcat service and the web app means cannot find
their host mbean:
2004-10-20 23:24:10,500 ERROR
[org.apache.commons.modeler.BaseModelMBean] Exception
invoking method init
javax.management.InstanceNotFoundException:
jboss.web:type=Host,host=localhost is not registered.
at
org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:509)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:636)
at
org.apache.catalina.core.StandardContext.init(StandardContext.java:5434)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
at
org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at
org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:322)
at
org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:83)
at
org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:373)
at org.jboss.web.WebModule.startModule(WebModule.java:62)
at org.jboss.web.WebModule.startService(WebModule.java:40)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
The problem is that the engine is finding the mbean
server using the modeller Registry which is using
MBeanServerFactory.findMBeanServer(null).get(0):
public synchronized MBeanServer getMBeanServer() {
long t1=System.currentTimeMillis();
if (server == null) {
if(
MBeanServerFactory.findMBeanServer(null).size() > 0 ) {
server=(MBeanServer)MBeanServerFactory.findMBeanServer(null).get(0);
if( log.isDebugEnabled() ) {
log.debug("Using existing
MBeanServer " + (System.currentTimeMillis() - t1 ));
}
} else {
server=MBeanServerFactory.createMBeanServer();
if( log.isDebugEnabled() ) {
log.debug("Creating MBeanServer"+
(System.currentTimeMillis() - t1 ));
}
}
}
return (server);
}
The MBeanServer needs to be that of the tomcat service
or tomcat deployer.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1051275&group_id=22866
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development