Hi there, I'm have an understanding problem, who wants to enlighen me: - build a small servlet that retrieved data from an Oracle database using Oracles OCI driver. In the process I learned to put the ojndi14.jar into the common\lib directory. - then I got the idea to move the stuff to JNDI. So I created a global data source in Tomcat (I used the Tomcat admin web interface, since I find the xml rather confusing). I named the JNDI "jdbc/umsys". When I try to resolve the name with a context I get an error that the name could not be resolved. So I miss something out (I presume). What could that be? (I restarted the whole machine). ;-) stw
P.S.: What I coded: here I get the error: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
I had a look into the server.xml and found:
[ May 29, 2004: Message edited by: Stephan Wissel ] [ Mike Curwen - edited server.xml snippet to use code tags and show only relevant portion. ] [ May 29, 2004: Message edited by: Mike Curwen ]
I'm not a big fan of global resources, and always use context-specific datasources. But if you want to go the global route, you need to link it to each context in which you want to use it. The 'global' in the name is slightly misleading in that it's not globally configured for all apps. It's more like it's globally 'available' to be used, but not until it's configured locally.
Originally posted by Mike Curwen: you're probably missing the resource link.
I'm not a big fan of global resources, and always use context-specific datasources.
Hi Mike, yup I missed the one with the resource link. Since I'm brand new to the Tomcat, I gotta bit confused about global and context stuff. So I'll follow that advice and move the database into the context. Thx a lot! ;-) stw