tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chirag Dewan <chirag.dewa...@yahoo.in>
Subject Re: Port still busy after removing connector in Embedded Tomcat 7.0.30
Date Tue, 14 May 2013 03:34:12 GMT


> You need to destroy the connector to close the port.

Mark,

That seems to work. :)

Now the port is free. But is it the right approach? Is this something we need to do in Tomcat
7 specifically? 


Thanks.


________________________________
 From: Mark Thomas <markt@apache.org>
To: Tomcat Users List <users@tomcat.apache.org> 
Sent: Tuesday, 14 May 2013 2:41 AM
Subject: Re: Port still busy after removing connector in Embedded Tomcat 7.0.30
 

On 13/05/2013 16:34, Chirag Dewan wrote:
> Hi,
> 
> 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 )
>         {
>             connector.decUsage();
>             if( connector.getUsage() == 0 )
>             {
>                 connector.stop();
>                 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.

You need to destroy the connector to close the port.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message