You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Glenn Nielsen <gl...@mail.more.net> on 2004/02/25 19:22:15 UTC

Re: Apache 2 module hook priorities, was: Help required on Apache from scratch...

Henri,

Perhaps we should bounce these last two messages to tomcat-dev
and continue the discussion there.

Resolving this problem will require a great deal of painstaking
work.  Setting up test conditions to test mod_jk 1.2/2 interaction
with other core apache modules and commonly used ones like mod_dav.
Once all the test conditions are setup then we will have to review
the hook priority for these modules and try to determine the best
hook settings for mod_jk or where we need to add code to handle exceptions
in mod_jk.  Then test again until all of our test conditions pass.

Regards,

Glenn

On Wed, Feb 25, 2004 at 06:12:23PM +0100, Henri Gomez wrote:
> 
> >Henri,
> >
> >Getting the priority set correctly for hooks in JK2 is sticky.
> >You might take a look at what I did setting hook priority in
> >mod_jk 1.2 so that it would work correctly with mod_dir. My
> >cvs commit messages might be helpful from 
> >jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c .
> >
> >Here is the page the docs how hook priority works:
> >
> >http://httpd.apache.org/docs-2.0/developer/hooks.html
> >
> >It all comes down to carefully reviewing the hook priority of other
> >modules and how those modules interact with JK2. Then setting the
> >hook priorities in JK2.
> 
> It seems we should add more code in jk2_map_to_storage(...)
> 
> Here's what you put in jk....
> 
> 
> Correct ?
> 
>  if(!r->proxyreq && !apr_table_get(r->notes, JK_WORKER_ID)) {
>            jk_server_conf_t *conf =
>                (jk_server_conf_t 
> *)ap_get_module_config(r->server->module_config,
>                                                         &jk_module);
> 
>            if(conf) {
>                char *worker;
>                if( (r->handler != NULL ) &&
>                    (! strcmp( r->handler, JK_HANDLER ) )) {
>                    /* Somebody already set the handler, probably manual 
> config
>                     * or "native" configuration, no need for extra 
> overhead
>                     */
>                    jk_log(conf->log, JK_LOG_DEBUG,
>                           "Manually mapped, no need to call 
> uri_to_worker\n");
>                    return DECLINED;
>                }
>                worker = map_uri_to_worker(conf->uw_map, r->uri, 
> conf->log);
> 
>                if(worker) {
>                    r->handler=apr_pstrdup(r->pool,JK_HANDLER);
>                    apr_table_setn(r->notes, JK_WORKER_ID, worker);
> 
>                    /* This could be a sub-request, possibly from 
> mod_dir */
>                    if(r->main)
>                        apr_table_setn(r->main->notes, JK_WORKER_ID, 
> worker);
> 
>                }
>            }
>        }
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

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