Hello, everybody

I am one of the people fighting with the PetStore. After having figured
out that EmbeddedTomcat was not handling form-based logins and the
prevented PetStore from functioning, I followed the advice of Scott M
Stark to upgrade to the latest tomcat-service snapshot. Indeed, I
preceeded in that direction. It turns out, that the latest snapshot of
tomcat-service.jar breaks JNDI integration between Tomcat and JBoss
(though it does fix form-based logins, as advertised).

I tried to fix that myself. Here is what I did and problems I ran into. At
this moment I'm stuck.

1. I've tried adding JbossWebXmlReader interceptor to Tomcat's
ContextManager as soon as TomcatEntry creates it in execute() method.

3. PROBLEM. Trying to run this caused an exception when JbossWebXmlReader
tries to get ServletLoader from the Context upon a initContext() call into
it. I get a null pointer exception. Presumably, TomCat has not initialized
the ServletLoader at this moment for this context and will do it sometime
later.

4. Attempt to fix: I tried simply removing this line from
JbossWebXmlReader (it was needed to set current thread's
ContextClassLoader and keep mapping between the classloader and document
base, since I was not sure how it was being used, I commented it out,
stupid, but what the heck!) This prevented the exception, jboss-web.xml
was read by TomCat, but my problem -- that a servlet failed on JNDI lookup
for the SecurityAdapter classname -- was not resolved. So, I guess that
knowing the classloader was essential for proper operation of JNDI (sorry 
for my illiteracy in this, I am very new to J2EE and related technologies,
have to learn on the fly by trial and error)

I've looked around a bit how to obtain the classloader that
JbossWebXmlReader wants but at this moment I did not figure this out, so
anyone has suggestions?


-------------------------------------------------------------------------
Anatoly Akkerman
Computer Science Dept.
Courant Institute of Mathematical Sciences, NYU
719 Broadway, #715                      Tel: 212 998-3525
New York, NY 10003                      Fax: 212 995-4123
-------------------------------------------------------------------------





--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to