Hi. I wanted to alert you to a problem I am seeing in the jboss-jetty
bundle.
In the update to org/jboss/jetty/JettyService.java 1.15, you removed the
code that starts the HttpServer in startService, because the HttpServer
gets registered with JMX in ensureMBean and started later by JMX.
However, there is a similar problem with the WebApplicationContexts.
When the HttpServer starts up, it starts each of the
WebApplicationContexts. (HttpServer.start line 127). However, each
context is also getting registered with JMX and started by JMX later on.
This happens because in HttpServer.addContext (line 423), it calls
BeanContextSupport.add(context). HttpServerMBean is registered as a
membership listener with the HttpServer, and it registers the context
with JMX.
Having the WebApplicationContext started twice is a problem because it
causes two ClassLoaders to be created for the context, which screws up
RMI. (CL 1 loads the classes for the local VM, but CL2 is set as the
Thread contextClassLoader which is used by RMI, so you get
ClassCastExceptions any time you get an object back from RMI).
I'm not sure what the best solution would be. I wonder though, why do
you want to register the contexts as MBeans when their life cycles are
managed by the HttpServer? Why not just let the server manage them?
The server also seems to manage its LogSink and its listeners, so as a
temporary workaround, I might just remove the call to add the
HttpServerMBean as a membership listener for the HttpServer. I would
love to hear your thoughts, though, and also to see a fix posted...
thanks
Dave
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user