2015-02-27 1:36 GMT+02:00 Mark Thomas <ma...@apache.org>: > > On 26/02/2015 22:56, Christopher Schultz wrote: > > > The solution is to put your <Resource> into your application's > > s/The solution/The best solution/ > > > context.xml and not into the site-wide defaults. Konstantin may not > > have spelled-out the solution, but he did give you all the information > > you needed to come to that conclusion on your own. > > Another (not so good because your application is no longer > self-contained) option is to define a global resource and put a > ResourceLink into the global context.xml or the application's context.xml.
About "not so good because your application is no longer self-contained" - this is normal in case when tomcat is an sysadmin headache, and admin is bearing responsibility for both tomcat and pool in it works well. As a programmer - my job is to connect to provided datasource, and use it normally. So best approach in this situation will be use of GlobalNamingResources http://tomcat.apache.org/tomcat-7.0-doc/config/globalresources.html#Environment_Entries to store there my jdbc-pools and just make ResourceLink http://tomcat.apache.org/tomcat-7.0-doc/config/globalresources.html#Resource_Links in application's META_INF/context.xml to get this datasource from global context. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org