This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer (Exam 1Z0-830) Java SE 17 Developer (Exam 1Z0-829) Programmer’s Guide and have Khalid Mughal and Vasily Strelnikov on-line!
See this thread for details.
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Cost of creating DataSource...

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

Just curious to know how costly a call to Create DataSource and open a connection to database server can be.

Also, what could be impact of such calls if made very often in a web based n-tier application.

Thanks .
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You would want to use connection pooling, where sessions are recycled;
see import oracle.jdbc.pool.OracleDataSource

Mike
 
Naveen Mishra
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi .
Actually I meant what impact would it make on my application performance if such calls are made frequantly.
As of now , i'm using WSAD and working with pooled connections only.

But , due to some design issues , I need to make such calls frequently.
so, i wanted to know the seriousness of such calls. In my env , Db server is an independent system and Application(server) runs on a diff system.

Hope , now my query is a bit more open .

Thanks for giving thought to my query.
 
author & internet detective
Posts: 42135
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Naveen,
No more so than using the pooled connection directly. WebSphere (or any other app server) lets you pick the class used in the data source. So you can still use the pooled connection and get the same benefits. More in fact, since the app server can manage the connection.
reply
    Bookmark Topic Watch Topic
  • New Topic