• 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

DataSource and ConnectionPool

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the difference between DataSource and ConnectionPool
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Off the top of my head, I'd say:
A Connection Pool is a database-specific implementation of the Broker Pattern. Connection Pools also imply pools that grow or shrink depending on requirements, and have other functionality like making sure the Connections don't become broken or stale. It is designed to manage database Connection resources.
A DataSource is a distributed connection manager. It is designed to serve out out connections to a distributed application from a centralised source. In theory it would respond to connection requests by opening a new Connection and returning it, but in practice they tend to have a Connection Pool hiding behind the scenes as well.
I guess you could view a DataSource as a decorator for a Connection Pool. It decorates the Connection Pool with the ability to be distributed.
Dave
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic