tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mladen Turk" <mt...@mappingsoft.com>
Subject RE: [PROPOSAL] RegisterNatives
Date Sun, 09 Jun 2002 08:38:51 GMT

> -----Original Message-----
> From: costinm@covalent.net [mailto:costinm@covalent.net] 
> Sent: 8. lipanj 2002 22:38
> To: Tomcat Developers List
> Subject: Re: [PROPOSAL] RegisterNatives
> 
> 
> On Sat, 8 Jun 2002, Mladen Turk wrote:
> 
> > Are there any reason why are we loading jkjni, or mod_jk2 for 
> 
> +1 !

Ok, here is the patch.

RegisterNatives are called inside jk_worker_jni.c for AprImpl class.
There is a small change in AprImpl.java that checks the name of
jniModeSo and if
the name equals "inprocess" (didn't think of anything smarter) the
native lib loading
is simply skipped. We trust that the native functions are inserted in
the JVM from the caller.

There is one potential problem about portability (apr_initialize call in
native initialize),
cause there is no need to call that from apache so I ifdef that out. The
apr_initialize for IIS should be called
IMO from DllMain  in jk_isapi_plugin, but I'm not familiar with that.

Nevertheless I've tested it with TC 4.1.3 and Apache-2.0.37-dev on
WINXP, build with VS7,
and it works as good as the 'standard' version :-).

Simply put the apr.jniModeSo=inprocess in jk2.properties, and that's it.


MT.

Mime
View raw message