Hi, Check out the META-INF/context.xml method for configuring data sources for your web app.
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Allistair -----Original Message----- From: slashny [mailto:[EMAIL PROTECTED] Sent: 31 March 2006 16:26 To: users@tomcat.apache.org Subject: RE: JNDI in embedded tomcat My question is similar but slightly different. I am running my own custom Spring-like container with an embedded version of Tomcat 5.5. I have my own JNDI Context object configured in my application that I bind objects to. However all those objects in that Context are not available to my web applications because Tomcat is using it's own Context: Context ctx = new InitialContext(); DataSource myDS = (DataSource) ctx.lookup( "java:/myDataSource" ); javax.naming.NameNotFoundException: Name myDataSource is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(InitialContext.java:347) I am starting up my application as per this article: http://www.vsj.co.uk/articles/display.asp?id=319. All the documentation I've seen has been using the server.xml which is not available to me as I'm using the Embedded tomcat. If I can use server.xml with Embedded.java, please let me know. Thanks -- View this message in context: http://www.nabble.com/JNDI-in-embedded-tomcat-t1306622.html#a3691348 Sent from the Tomcat - User forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> ------------------------------------------------------- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 ------------------------------------------------------- </FONT> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLACK> Disclaimer: The information contained within this e-mail is confidential and may be privileged. This email is intended solely for the named recipient only; if you are not authorised you must not disclose, copy, distribute, or retain this message or any part of it. If you have received this message in error please contact the sender at once so that we may take the appropriate action and avoid troubling you further. Any views expressed in this message are those of the individual sender. QAS Limited has the right lawfully to record, monitor and inspect messages between its employees and any third party. Your messages shall be subject to such lawful supervision as QAS Limited deems to be necessary in order to protect its information, its interests and its reputation. Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS Limited cannot guarantee that attachments are virus free or compatible with your systems and does not accept any liability in respect of viruses or computer problems experienced. </FONT> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]