tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Leyke <alexley...@cs.com>
Subject Re: JK2 module for AOLserver
Date Thu, 21 Nov 2002 22:36:39 GMT


Costin Manolache wrote:

>In jk2, all those strings are eliminated ( from C side ), we also eliminate
>the buffer allocation ( we reuse the same jbyteArray and C array, with
>code to eventually support NIO - that cuts 2 memcpy and few other small
>things ). We also reduce the number of JNI calls to a minimum ( or almost ).
>
>Regarding the single-threaded behavior - I think this is a major benefit
>for JNI ( or doors ) workers, since it can avoid thread switching and a lot
>of synchronization. In all other protocol there are 2 threads sending data
>to each other. This won't be visible for a small number of RPS, but 
>I expect it to be important for very high loads. Well - most likely this
>is just a benchmarking exercise - if the servlets are doing anything usefull
>they'll dominate the execution time anyway, the connector overhead is 
>already extremely small.
>
>  
>
Ah! I understand now what you meant by "single-threaded". It does sound 
like a better option.

>You just need to port the nstomcat module to jk2. 
>
>jk1 doesn't support tomcat4 in-process, jk2 does. From the connector
>point of view it doesn't matter what tomcat is run ( at one point
>it even detected the tomcat version at runtime - all it cares is to
>have coyote/jk2 available and have a class with main() ).
>
>  
>
Exactly what I am doing. I have all AOLserver JK2 C code (simingly!) in 
place, and after fixing some things in workers2/jk2.properties I can see 
the worker attempt to communicate with AJP connector on port 8009:

jk_channel_socket.c:328:channelSocket.open() connect failed 
localhost:8009 146 Connection refused

I think above is due to Tomcat failing to initialize properly when 
in-process. It does listen on 8009 when I launch it from command line.

>Did you get the connector to work with sockets ? ( i.e tomcat out
>of process ) ? That's the first step, you need this to work well
>to test the aol-specific code. 
>  
>
Yes. Works perfectly well, leaves nothing suspicious in the logs.

>You can configure a different starter ( TomcatStarter did work 
>with an older version of BootstrapService - now you can't use
>the 4.1 version of BS without daemon ). You can probably try
>to just configure it to use o.a.catalina.startup.Bootstrap.
>( or a different starter with a main() )
>  
>
I see o.a.jk.apr.TomcatStarter.main() call 
o.a.catalina.startup.BootstrapService.main(). I didn't think of changing 
the bootstrap class. I see the followin "candidates":

org/apache/catalina/startup/Bootstrap.class
org/apache/catalina/startup/BootstrapService.class
org/apache/catalina/startup/CatalinaService.class
org/apache/catalina/startup/Catalina.class
org/apache/catalina/startup/Embedded.class

Unfortunately the link to Catalina Javadocs off is broken on the 
jakarta.apache.org Website. I'll browse through the Java sources, 
butwould be helpful if anyone could mention which bootstrap class I 
could use in place of TomcatStarter

A related question - what does this log entry mean? I think it is 
related to [worker.jni:onShutdown] entry in workers2.properties.

jk_worker_jni.c:369:jni.init() disabling the non init hook worker

Thanks,
Alex


>>::::::::::::::
>>stderr.log
>>::::::::::::::
>>TomcatStarter: main()
>>Try  org.apache.tomcat.startup.Main
>>Try  org.apache.catalina.startup.BootstrapService
>>Starting org.apache.catalina.startup.BootstrapService
>>java.lang.NullPointerException
>>        at org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:244)
>>    
>>
>>        at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
>>    
>>
>>        at java.lang.reflect.Method.invoke(Native Method)
>>        at org.apache.jk.apr.TomcatStarter.run(TomcatStarter.java:127)
>>        at java.lang.Thread.run(Thread.java:484)
>>Created catalinaLoader in: /<deleted -
>>AL>/jakarta-tomcat-4.1.12/server/lib
>>[INFO] Registry - -Loading registry information
>>[INFO] Registry - -Creating new Registry instance
>>[INFO] Registry - -Creating MBeanServer
>>[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8089
>>java.lang.ArrayIndexOutOfBoundsException
>>        at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:305)
>>    
>>
>>        at java.lang.reflect.Method.invoke(Native Method)
>>        at org.apache.jk.apr.TomcatStarter.run(TomcatStarter.java:127)
>>        at java.lang.Thread.run(Thread.java:484)
>>java.lang.ArrayIndexOutOfBoundsException
>>        at org.apache.jk.apr.TomcatStarter.run(TomcatStarter.java:131)
>>        at java.lang.Thread.run(Thread.java:484)
>>::::::::::::::
>>stdout.log
>>::::::::::::::
>>Bootstrap: Starting service
>>TomcatStarter: Done
>>TomcatStarter: Done
>>    
>>
>
>  
>


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


Mime
View raw message