I try to setup a database connection in java with JNDI in combination with eclipseLink/JPA on Tomcat 5.5. I already configured the JNDI resource in web.xml and context.xml.
I think you need to code a workaround for the javax.naming.NamingException: This context must be accessed throught a java: URL
exception as detailed at http://wiki.eclipse.org/EclipseLink/Examples/JPA/Tomcat_Web_Tutorial#Session_Customizer
Also see this link which debugs through the problem
http://forums.java.net/jive/message.jspa?messageID=158622