Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

data source, connection and connection pool

 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Whats the difference between data source and connection ?
Thanks in advance
Hari
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A DataSource is usually a group of Connections. Many web/app severs allow for the creation of a DataSource via a config file/tool.
Basically, if you have an app that access that database frequently, a DataSource is the way to go. If you develop a web store front, you want everyone to be able to view your catalog. It would not be very performant to create a dedicated Connection for each new user. This would cause a large number of new Connections (which is expensive) for a user that will use it only briefly. The DataSource allows a request to grab a Connection, use it, and put it back in the pool when complete. The eliminates the steps of creating a new Connection and storing a possibly high number of Connections.
Most servers allow you to set the number of Connections in a pool at start, the number to increment if that is not enough and a maximum number to user.
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
cheers for the help
 
Hari babu
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
How diffrent is the data source from connection pool ?
Hari
 
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Hari babu:
Hi,
How diffrent is the data source from connection pool ?
Hari


Perhaps you should try this
link. It discusses how to use a pooled connection using a DataSource (3.7 to 3.7.4)
 
All that thinking. Doesn't it hurt? What do you think about this tiny ad?
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic