On 06/23/2012 09:05 AM, Konstantin Kolinko wrote:
2012/6/22 Francesco<vigo...@gmail.com>:
Hi , i'm new in this mailing list, i've started recently to integrate tomcat
in some of my applications ( i found a lot easyer to manage tomcat inside a
big servlet than viceversa), as early adopted java developer i hope to help
a bit in tomcat development when i become a bit more expert, at this moment
my tomcat integration it's stuck with the AprLifecycleListener class,
i've compiled, installed apr ,jni, ssl and so fort documentation is a bit
tricky on that... expecially for path+external variables handlings and
compiling configurations,
i really hope to have time to build a guidelines for everything about
that...
...anyway i'll go to explain my issue :
public class AprLifecycleListener
it's a class which load jni component and check for apr existance and
versionm,
at first request it call :
private static void init()
then set a boolean private and unaccessible variable which avoid successive
calls
if (aprInitialized) {
return;
}
my problem is that this class seems to not recognize apr in my computer.. i
don't know exactly when this is called, anyway if i overload this class and
force to call the init() again within my overloaded class it works...
i don't have a ready to test class , it will take some time to produce, but
if really needed i'll do..
1. AprLifecycleListener is a LifecycleListener.
That is, you must add it to a server and it will react on lifecycle
events coming from it.
2. Tomcat-Native is a native library. There are JRE limitations
associated with that:
One of them is that such library must be loaded exactly once. You
cannot load it twice. You cannot load it from two different class
loaders.
This issue usually comes up with JDBC drivers that have native components.
In the FAQ:
http://wiki.apache.org/tomcat/HowTo#I.27m_encountering_classloader_problems_when_using_JNI_under_Tomcat
3. If you want to debug Tomcat, some tips are in the FAQ.
http://wiki.apache.org/tomcat/FAQ/Developing#Debugging
4.
my problem is that this class seems to not recognize apr in my computer.
The actual error messages =?
5. Do you need Tomcat-Native library at all? Tomcat runs fine without it.
Best regards,
Konstantin Kolinko
i understand what you mean, i'll try to explain better my concerns..
1.(reply to 1 and 2) obviously AprLifecycleListener is mean to be loaded
once (else the boolean value to avoid to load it twice is silly..) the
question about that is.. why if:
A) i ask to standard loaded it doesn't work
B) i load it in a overloaded class it works (even if i load once only,
C) if i load it with standard loader, doesn't work, than i load it in my
overloading class it works, and then ovbiously works again in the
standard AprLifecycleListener class..
so what i am missing in that? or what is missing the
AprLifecycleListener class that my overloading class is not? (these are
almost identical!)
2. (reply to 2 , 3 and 4 )
i've already looked at that, i'll probably should compile the tomcat
source and try to play in it to better debug (because class of tomcat
distributable have lot of private members that cannot be touched to
search the exactly point of problem source, i know only that the
overloaded class works, even if it's semi-identical to the original
which doesn't load apr.. maybe someone who already have had to do with
that can help me...
anyway no error appears, this is the output of my testcase (with all
loggers writing to stderr/stdout , it only start in bio instead of apr..
ORIGINAL APR AVAILABLE? false
initializeWebServer()__start
tomcat basedir = /tmp
SERVER TMPDIR = /tmp
APRAVAILABLE?::false
FastTomcat::STARTING()::Apache Tomcat/7.0.28
Jun 25, 2012 7:56:36 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8087"]
Jun 25, 2012 7:56:36 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jun 25, 2012 7:56:36 AM
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans
SEVERE: No global naming context defined for server
Jun 25, 2012 7:56:36 AM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Tomcat
Jun 25, 2012 7:56:36 AM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.28
Jun 25, 2012 7:56:37 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8087"]
Jun 25, 2012 7:56:37 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
3. (reply to 5)
yes i have done some tests, i have very busy servers which serve A LOT
of small static content and a good amount of dynamic which i've
programmed now in java.. , i was using lighttpd previously but i found
tomcat with apr very fast not as lighttpd but lighttpd created lot of
problem in serving dynamic content
thank you for your reply :)
Francesco
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org