tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: One process per webapp
Date Tue, 14 Jun 2011 21:22:33 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gili,

On 6/14/2011 3:28 PM, cowwoc wrote:
> Christopher Schultz-2 wrote:
>>
>> Why bother redeploying, then? Instead of doing "ant redeploy", just do
>> "ant bounce" or something similar.
> 
> I am running inside Netbeans (remember the focus here is on improving
> development productivity, less so on improving production deployments).
> Modifying what they run under the hood is probably not going to be trivial.

Can't Netbeans bounce the Tomcat JVM for you?

If this is just in development, why not just wrap System.loadLibrary()
in a try/catch block and ignore the exception you get when re-loading
the native library?

This just seems like it would be a lot of work for not much gain.

>> If you deploy no webapps, how long does it take Tomcat to start up?
> 
> It takes about 10 seconds to shut down and start up a new instance.

With no webapps deployed at all? Wow, something is not right. Are you
sure you have enough memory installed on your dev instance?

> Starting
> up a new instance is fairly quick. Shutting down takes a while.

That seems strange... do you have a complicated shutdown procedure for
your webapp? Tomcat shuts down on my end in very short order when no
webapps need to be undeployed.

> When restarting a webapp, we don't have to wait for the old instance to
> finish shutting down (which is slow) before transferring access to another
> Tomcat instance.

If they're going to be using the same port, you do.

> The new instance can simply bind to a different port and
> the proxy running at port 80 can switch which port it is redirecting
> requests to.

So... you want Tomcat to also notify a 3rd-party that it's being shut
down so that a proxy can re-configure itself?

> The only snag I can think of is that the old instance might
> keep files locked on disk (but I think this is no longer the case with
> Tomcat 7.x)

I don't believe Tomcat locks anything specific. Under certain
situations, the JVM and the OS conspire to lock certain resources
(usually .jar files) and that can be a problem.

If you're starting a new instance in parallel, wouldn't you want to do
it from a separate directory anyway?

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

iEYEARECAAYFAk330RgACgkQ9CaO5/Lv0PCH6ACfTAZ1m0wSocjfvnfLeYHegzbd
BJAAoLAFzIa5fQ/V/k3GYFPtUw6qKjm2
=/62c
-----END PGP SIGNATURE-----

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


Mime
View raw message