Hello!

I am working on a JK2 module for AOLserver and would like to receive feedback on JNI and compiler issues I encountered. My environment is Solaris 7, AOLserver 3.4 and Tomcat 4.1.12. Issues:

1) Can't use JNI worker. AOLserver follows single-process, multi-threaded architectural model and its native scripting language is Tcl. Executing servlets in-process would help to bridge a gap between Java and Tcl and so is an important motivation in this project. My module loads JVM and initializes Tomcat in-process, but then I encounter 2 conditions:

"ajp13" worker factory seems to be hardcoded regardless of actual worker type. Here is a snippet from JTC-4.1.12/jk/native2/common/jk_workerEnv.c:

static int jk2_workerEnv_addChannel(jk_env_t *env, jk_workerEnv_t *wEnv,
jk_channel_t *ch)
{
...
/* Automatically create the ajp13 worker to be used with this channel.
*/
jkb=env->createBean2(env, ch->mbean->pool, "ajp13", ch->mbean->localName );
...
}

I changed the code above to use "ajp13" or "worker.jni" depending on ch->mbean->localName , but that still didn't help, because jk2_jni_worker_service function in JTC-4.1.12/jk/native2/common/jk_worker_jni.c is a placeholder. I did make sure not to use default "lb" worker for JNI.

Is JNI worker intentionally disabled, or am I misinterpreting the code? I could fix jk2_jni_worker_service function with some guidance, but is there a similar implementation gap in Tomcat 4 Java classes?

2) JTC build doesn't seem to be very friendly for non-GNU compilers. I use Sun Workshop, and had to write some hacks to make ant and libtool work with Sun's C compiler. In particular, both ant and libtool insisted on supplying invalid "-W" command option to compiler. I suspect that JTC-4.1.12/jk/jkant/java/org/apache/jk/ant/compilers/CcCompiler.java is intended for UCB cc support, and I need to write a separate class for ant to work with Sun's cc and bypass libtool (which configured itself mostly correctly to use Sun cc, but still insisted on "-W"). Had anyone had any relevant experience?

Thanks very much!

Alex Leykekh
Sr. Software Engineer, AOL Digital City


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to