Thanks for the report, this is already fixed in the latest releases of jetty and is in Jboss 3.0.5 (but that has some other problems).
I recommend 3.0.6 which will be out very soon now. regards Jan Bartel wrote:> Fred,
I am forwarding your bug report to the Jetty support list where it will receive more attention.
regards,
Jan
-------- Original Message --------
Subject: [JBoss-dev] Jetty addListener/removeListener exception
Date: Tue, 21 Jan 2003 12:12:33 -0500
From: Fred Hartman <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Jboss-Development (E-mail) <[EMAIL PROTECTED]>
Using JBoss/Jetty 3.0.3. I have an MBean that dynamically adds and removes
SocketListeners from Jetty HttpServer.
It looks like there is a problem in
main/org/mortbay/http/SocketListener.java:
public void setHttpServer(HttpServer server)
{
Code.assertTrue(_server==null || _server==server,
"Cannot share listeners");
_server=server;
}
Should be
public void setHttpServer(HttpServer server)
{
Code.assertTrue(server==null || _server==null || _server==server,
"Cannot share listeners _server:"+_server+"
server:"+server);
_server=server;
}
because in main/org/mortbay/http/HttpServer.java addListener sets to a
non-null value, then removeListener sets to null, therefore do addListener
and then removeListener would always cause the assert to fail, generating an
exception.
public HttpListener addListener(HttpListener listener)
throws IllegalArgumentException
{
listener.setHttpServer(this); //<<<--sets to non-null
_listeners.add(listener);
addComponent(listener);
return listener;
}
public void removeListener(HttpListener listener)
{
[clip]
_listeners.remove(l);
removeComponent(listener);
if (listener.isStarted())
try{listener.stop();}catch(InterruptedException
e){Code.warning(e);}
listener.setHttpServer(null); //<<<--sets back to null
[clip]
}
The same issue can be found in AJP13Listener.java.
Cheers,
Fred
-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development
For the latest information about Jetty, please see http://jetty.mortbay.org
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
-- Greg Wilkins<[EMAIL PROTECTED]> Phone/fax: +44 7092063462 Mort Bay Consulting Australia and UK. http://www.mortbay.com ------------------------------------------------------- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
