aspose file tools*
The moose likes JDBC and the fly likes Cost of creating DataSource... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Cost of creating DataSource..." Watch "Cost of creating DataSource..." New topic
Author

Cost of creating DataSource...

Naveen Mishra
Ranch Hand

Joined: Nov 20, 2005
Posts: 75
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

Joined: May 29, 2004
Posts: 36
You would want to use connection pooling, where sessions are recycled;
see import oracle.jdbc.pool.OracleDataSource

Mike
Naveen Mishra
Ranch Hand

Joined: Nov 20, 2005
Posts: 75
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
Marshal

Joined: May 26, 2003
Posts: 31077
    
233

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cost of creating DataSource...