tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chirag Dewan <>
Subject Port still busy after removing connector in Embedded Tomcat 7.0.30
Date Mon, 13 May 2013 15:34:14 GMT

I am embedding  Apache Tomcat 7.0.30 in my application. I am using the Tomcat class,and my
application requires dynamic addition and removal of connectors(HTTP).

Now while removing the connectors,the application gets undeployed but the port remains occupied
and the connector continue to listen on the port. I am using customized HTTP connector.

  Here is a snippet from my source code:

for removing connector:

if( connector != null )
            if( connector.getUsage() == 0 )
                this.tomcat.getService().removeConnector( connector );

for adding connector:

this.tomcat.getService().addConnector( connector );

I know the port is not getting free. Because when I try to deploy to the same port again,it
gives me an address already in use exception.
I have surfed for this issue a lot,but to no avail. Any help would be greatly appreciated.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message