tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Port still busy after removing connector in Embedded Tomcat 7.0.30
Date Tue, 14 May 2013 09:27:11 GMT
On 14/05/2013 04:34, Chirag Dewan wrote:
> 
> 
>> 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?

You had a problem you couldn't solve. Someone with an @apache.org e-mail
address (i.e. an Apache committer and probably a Tomcat committer -
something you can easily check) provided a solution that worked and you
are asking if that solution is correct? I am trying very hard not to be
to be extremely sarcastic right now.

> Is this something we need to do in Tomcat 7 specifically?

There was a lot of lifecycle clean-up in Tomcat 7 including:
- using the same interface for all components
- adding JMX registration consistently
- making sure things were symmetric (what is done in init() is undone in
destroy(), what is done in start() is undone in stop())

It is likely that binding and unbinding of the port were different in
Tomcat 6 but I haven't checked svn to confirm this.

Sockets in Tomcat 7 connectors are bound in init() and unbound in
destroy() by default although you can change this to start() and stop()
by setting the bindOnInit attribute on the connector to false.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message