On Sun, May 01, 2005 at 05:46:22PM -0700, appa rao wrote: : However if I try to get the connection from the Pool from an application which is not deployed in Tomcat (remote client), I am getting not bound exceptions.
This makes sense. Keep in mind, JNDI is just a lookup/storage service for objects. The container maintains its own (internal) JNDI service, and one object it stores there is the DataSource that represents your connection pool. When last I checked (admittedly, it's been a while), Tomcat's JNDI service is not available outside of the container. So ask yourself this: does your non-webapp code really need a DataSource pulled from JNDI? (find a JNDI service, create a DataSource, store it) or does it just need access to a DataSource, period? (abstract your data access into a separate layer, such that your code doesn't know from where its gets Connection objects) Either way, someone will have to configure the connections for the non-webapp code; one convenience provided by containers is that they take care of instantiating/configuring the DataSource for you (based on your entries in server.xml/context.xml). -QM -- software -- http://www.brandxdev.net/ tech news -- http://www.RoarNetworX.com/ code scan -- http://www.JxRef.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
