-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric,

On 9/19/2011 3:45 AM, Eric Bouer wrote:
> I'm using tomcat for a J2EE application that uses
> Spring/Hibernate/JSF. The spring container and hibernate bootstrap
> are slow and the users get a blank page or no response from tomcat
> while the application starts. In order to avoid that I was thinking
> about some static page that can be served by a different thread but
> the problem is that there are muiltiple wars and I wish to have a
> simple solution.
> 
> I'd like to know if Tomcat already provides a solution for this
> problem or if it is a planned feature request (couldn't find any) 
> Or is there another way to solve this issue?

Tomcat itself has no such feature, but it sounds like it would be easy
to build yourself.

Presumably, you have a webapp that takes some time to start up, given
all the ServletContextListeners that need to fire.

Instead of doing some long-running task in a (series of)
ServletContextListener(s), you could use a single one to launch a new
thread that performs all your setup and then sets some token in the
application scope (something like "configured"). Couple that with a
Valve or Filter that checks the status of that token and displays so,e
static page and you're done.

Now, this static page won't be available instantly... you'll still
have to wait for Tomcat to read your webapp's web.xml, create whatever
environment you've requested (JNDI, etc.) and then launch your
ServletContextListener, but that should happen "very fast" as Tomcat
has very little overhead for actually launching a webapp. It's usually
the webapp that takes a while to get started.

The best thing for you to do for HA would be to have redundant
services so that nobody ever has to see the "we're not quite up yet"
page. Are you finding that you still get error pages back from Tomcat
during deployment under such conditions?

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk53X7sACgkQ9CaO5/Lv0PAfhwCggdJ7BtKxg58DA8Ubdr54bAK5
z/QAoLokZviEjUEaJkso0nGrY9Cds2y/
=Pjhp
-----END PGP SIGNATURE-----

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

Reply via email to