On 21/03/2013 09:57, André Warnier wrote:
> Stadelmann Josef wrote:
>> Hi
>>
>> Is there an easy way to manage, to prevent, that my AS Tomcat is serving
>>
>> request before it is fully up and running; while fully up means - it has
>> deployed all web apps and web app axis2 (a servlet engine) is up and
>> has deployed
>> all its
>> modules *.mar and web service archives *.aar before any requests for
>> this web
>> services are accepted.
>>
> Hi.
> I believe that the basic answer to this question is no.
> The only thing which knows when an application is ready to answer
> requests is .. that same application.
> 
> It is not very clear to me what the "bindOnInit" Connector attribute
> means exactly in that respect :
> 
> bindOnInit   
> 
> Controls when the socket used by the connector is bound. By default it
> is bound when the connector is initiated and unbound when the connector
> is destroyed. If set to false, the socket will be bound when the
> connector is started and unbound when it is stopped.
> 
> (It is probably my lack of knowledge of what precisely is meant by "the
> connector is initiated" versus "the connector is started" here)
> 
> But even assuming that it delays the moment when the Connector binds to
> the port (meaning that until then, the listening port is not open, and
> no clients can connect to it), the Connector is shared between /all/
> applications, so I think that it would be difficult for the Connector
> "to know" when /all/ applications are really "ready".  Different
> applications may have different ideas of when they are really "ready to
> serve requests".

The connector is not started until all web applications have been
started. That means that:
- all loadOnStartup servlets have been loaded
- all ServletContextListeners have completed
- etc.

It also means that Tomcat has finished its internal startup for the
Contexts, Host(s) and Engine.

There are no hooks (apart from receiving a request) for a web
application to trigger any further initialisation so it must be ready to
process requests at this point.

Mark


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

Reply via email to