Re: Tomcat data source

2007-12-05 Thread Konstantin Kolinko
I have seen the documentatio many and many times... My question is clear? The response to my question is: Isn't possible get dataSource reference if is not defined on webApp context... Yes, it is not possible.The reference should be defined (either in context.xml, or in web.xml, but it should

Re: Tomcat data source

2007-12-05 Thread Roberto Pellegrino
In my application is present a interface (visible only to admin) who permit to specificate what kind of db connection use to make query: - DataConnection -- url, user, pass, driver. If the data are correct it work. - DataSource -- If data source are defined on webApp context the name is the

Re: Tomcat data source

2007-12-05 Thread Roberto Pellegrino
I have seen the documentatio many and many times... My question is clear? The response to my question is: Isn't possible get dataSource reference if is not defined on webApp context... This is a limitation if application expose a method to make query in varius and dinamic datasource Only

Re: Tomcat data source

2007-12-05 Thread Martin Gainty
] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, December 05, 2007 5:13 AM Subject: Re: Tomcat data source I have seen the documentatio many and many times... My question is clear? The response to my question is: Isn't possible get dataSource reference if is not defined on webApp

Re: Tomcat data source

2007-12-05 Thread Pid
Roberto Pellegrino wrote: DataSource defined on webApp context are accessed by similar url : java:comp/env/jdbc/dataSourceName. Now. Is't possible use with a url datasource that are only defined in GlobalNamingResources (in server.xml) using the name ??? ResourceLink ... In your

Tomcat data source

2007-12-04 Thread Roberto Pellegrino
Hi all, i use Tomcat *5.5.17 *my question is quite simple: it's possible to use a dataSource that are not defined on webApp context??? I define the dataSource on server.xml as follow: Resource auth=Container driverClassName=DriverClassName validationQuery=select count(*) from table

Re: Tomcat data source

2007-12-04 Thread David Smith
I don't think you can just define a global datasource and not make a reference to it in the context.xml file. --David Roberto Pellegrino wrote: Hi all, i use Tomcat *5.5.17 *my question is quite simple: it's possible to use a dataSource that are not defined on webApp context??? I define

Re: Tomcat data source

2007-12-04 Thread Roberto Pellegrino
I have a particular application who make select query and show results. The dataSource are dinamic and defined by the administrator, not know at develop time. I want to be able to use the tomcat dataSource to use the pool... - Robert - David Smith wrote: I don't think you can just define a

Re: Tomcat data source

2007-12-04 Thread David Smith
Then you might want to incorporate your own DBCP pool and a brief config page in your webapp. - Store config data in a properties file inside WEB-INF or somewhere else. - Use a ServletContextListener to initialize the DataSource and store it in the ServletContext. - Implement a secured jsp or

Re: Tomcat data source

2007-12-04 Thread Roberto Pellegrino
DataSource defined on webApp context are accessed by similar url : java:comp/env/jdbc/dataSourceName. Now. Is't possible use with a url datasource that are only defined in GlobalNamingResources (in server.xml) using the name ??? - Robert - David Smith wrote: Then you might want to