Hi I need to start and stop a connector inside a servlet. That works with the following code:
final org.apache.catalina.connector.Connector nioConnector = new org.apache.catalina.connector.Connector( "org.apache.coyote.http11.Http11NioProtocol" ); nioConnector.setAttribute( "executor", "osiris4Executor" ); nioConnector.setPort( port ); nioConnector.setRedirectPort( 443 ); service.addConnector( nioConnector ); Then I can access the application using that port. I can also remove the connector again: try { nioConnector.stop(); } catch ( LifecycleException e ) { e.printStackTrace(); } service.removeConnector( nioConnector ); However, I seem to miss some step, because a "NioBlockingSelector.BlockPoller-X" thread is left. As I called the upper code in a testcase in a loop I ended up with lots of such threads. What do I have to do to completely remove a connector? (BTW: How can I find and use an executor that is defined in server.xml using the code above?) Regards, Steffen
smime.p7s
Description: S/MIME cryptographic signature