Thanks Mark

That certainly looks like the place to start.

Regards

Ron

----- Original Message ----- From: "Mark Thomas" <ma...@apache.org>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Saturday, March 14, 2009 11:38 PM
Subject: Re: Extending JNDI


Ron McNulty wrote:
Hello

I am running Apache Jetspeed Portal server (which sits on top of Tomcat) as a development platform. We then deploy portlets to Websphere portal server for production.

One area of incompatibility that I would like to fix is JNDI branches. Tomcat provides the standard java:comp/env/ branch, but IBM have a couple of other branches (e.g. /cells/persistent/... and /services/...) that don't have the usual java:comp/env/ prefix. As JNDI paths specified in /conf/context.xml automatically get the prefix added, these JNDI paths won't work on Tomcat/Jetspeed.

I have an application level fix that works, but developers need to use a specific class to do JNDI access (and regularly forget to do so). So I would like implement the other JNDI branches in Tomcat itself. It would be nice if this could be done as a plug-in module, but I am happy to hack the Tomcat source code if necessary.

My impression is that I would need to provide a new naming context to implement this. Can anyone point me at some documentation or give me some ideas on how I could implement these paths?

Take a look at
http://svn.eu.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?view=markup

look for namingContextListener
and
http://svn.eu.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java?view=markup

You can see from those how Tomcat does this.

I suspect you'll need to patch one or both of these. The
createNamingContext() method in the listener looks like a good place to
start.

HTH,

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to