• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple Datasource declaration in tomcat context.xml

 
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

I need to have multiple connection pools in my application. As I am using Tomcat 8.x , I have decided to use the tomcat container for managing my data sources.
For this I made multiple entries in context.xml for Resource tag



And for getting connection I look up the context and all DataSources present in the context.
I save all datasources in a Map<String,DataSource> and able to create connection with each datasource.

I am confused that if I call close on the retrieved connection , Will it be returned to the pool from which it was fetched ? Or It will be lost?
What will happen to such Connection object?


Please guide me.

Thanks in advance.

 
reply
    Bookmark Topic Watch Topic
  • New Topic