This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Cost of creating DataSource...  RSS feed

 
Naveen Mishra
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • 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 .
 
Mike Rainville
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37222
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!