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);
} } }