You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Bojan Smojver <bo...@binarix.com> on 2001/04/09 01:34:09 UTC

mod_webapp, mod_jk etc.

I've posted a few messages about this to Tomcat User list, but since
this is really development related, I'm posting this one here.

Basically, mod_webapp packaged with Tomcat 4.0 b2 and b3 doesn't
compile, so I switched back to the version from b1. I've noticed a few
things:

- I'm confused as to why mod_webapp (and mod_jk) aren't designed to be
statically linked with Apache; after all this is a supported
configuration of Apache, runs faster and it has a smaller memory
footprint; I know that mod_jk works nicely when statically linked, I use
it in my production environment; most other modules support this,
including really big ones like mod_ssl, mod_php, mod_perl etc.

- mod_webapp from T4b1 doesn't survive the second round of
initialisation on Unix because it reports duplicate WebAppConnection
entries (at least when statically linked, not sure if that affects the
dynamically linked version); this can be easily fixed by using tricks
from mod_ssl, where they use ap_global_ctx to store status of
initialisation and check on it later - although I'm not Apache API
proficient I think I could write that kind of code by stealing from
mod_ssl when pushed in the right direction by developers of mod_webapp

- even after changing the code of mod_webapp to survive the second round
of initialisation (by removing the duplicate check of WebAppConnection
and WebAppMount), it still fails when being used with error 'Cannot
switch to passive mode'; part of the requested page appears but then
there is the stack trace due to some null pointers in Catalina, probaly
related to the fact that mod_webapp just died

- I understand the need for the TCP connections to be persistent in
mod_jk and mod_webapp, but I'm not sure why another connection wouldn't
be attempted after the reuse of the previous connection fails; in
production environments it is sometimes handy to restart Tomcat only,
without touching Apache; also, if Tomcat dies and gets automatically
restarted, the connections would still go through from Apache; Apache
with mod_ssl might need a password at startup and automatic restart of
it might not be possible; how difficult would it be to have
functionality like that in mod_webapp/mod_jk? - once again, if I'm
pushed in the right direction...

As you're all aware, every developer is scratching his/hers own personal
itch. Nothing new here. I just kind of like Catalina's features and I
would really like it to work behind Apache...

Bojan

Re: mod_webapp, mod_jk etc.

Posted by Bojan Smojver <bo...@binarix.com>.
Beauty.

I'm actually playing with 3.3 as well, because some of the features I
like (eg. realm per host) are there as well.

Bojan

Dan Milstein wrote:
> 
> I can't speak to mod_webapp, but a mod_jk response:
> 
> > - I understand the need for the TCP connections to be persistent in
> > mod_jk and mod_webapp, but I'm not sure why another connection wouldn't
> > be attempted after the reuse of the previous connection fails;
> 
> This was just added to the 3.3 branch (by Henri) for mod_jk -- if the Apache
> plugin detects a dead connection, it opens a new one (so you don't have to
> restart Apache when you restart Tomcat).  Needs testing, but it's in there.
> 
> -Dan
> --
> 
> Dan Milstein // danmil@shore.net

Re: mod_webapp, mod_jk etc.

Posted by Bojan Smojver <bo...@binarix.com>.
Forgot to ask, would you be interested in instructions/simple shell
script for building mod_jk as a statically linked Apache module?

Bojan

Dan Milstein wrote:
> 
> I can't speak to mod_webapp, but a mod_jk response:
> 
> > - I understand the need for the TCP connections to be persistent in
> > mod_jk and mod_webapp, but I'm not sure why another connection wouldn't
> > be attempted after the reuse of the previous connection fails;
> 
> This was just added to the 3.3 branch (by Henri) for mod_jk -- if the Apache
> plugin detects a dead connection, it opens a new one (so you don't have to
> restart Apache when you restart Tomcat).  Needs testing, but it's in there.
> 
> -Dan
> --
> 
> Dan Milstein // danmil@shore.net

Re: mod_webapp, mod_jk etc.

Posted by Dan Milstein <da...@shore.net>.
I can't speak to mod_webapp, but a mod_jk response:

> - I understand the need for the TCP connections to be persistent in
> mod_jk and mod_webapp, but I'm not sure why another connection wouldn't
> be attempted after the reuse of the previous connection fails; 

This was just added to the 3.3 branch (by Henri) for mod_jk -- if the Apache
plugin detects a dead connection, it opens a new one (so you don't have to
restart Apache when you restart Tomcat).  Needs testing, but it's in there.

-Dan
-- 

Dan Milstein // danmil@shore.net