This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes using connection pooling for a standlone java application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "using connection pooling for a standlone java application" Watch "using connection pooling for a standlone java application" New topic
Author

using connection pooling for a standlone java application

Giriraj Bhojak
Ranch Hand

Joined: Apr 03, 2008
Posts: 71
Hi,

Is it possible to use connection pooling for DB2ConnectionPoolDataSource outside of a server?
I am trying to use DB2ConnectionPoolDataSource in IBM universal driver(type 4) through a standalone application.
I am not sure whether i can use it in an a standalone app or i need to have an application server to manage pooling.

Regards,
Giriraj.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

You can use it standalone.


OCUP UML fundamental and ITIL foundation
youtube channel
Giriraj Bhojak
Ranch Hand

Joined: Apr 03, 2008
Posts: 71
Thanks a lot Jan,

In the meantime I also looked at Jakarta Common's DBCP.
I wonder whether it would be better to use the pooling mechanism of DBCP or to use DB2ConnectionPoolDataSource.
Any thoughts on this?

Regards,
Giriraj.

Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

I have no real preference. I use the commons implementation, because it works with drivers that do not support pooling.

What I would not do, is rely on DB2 (or Oracle, or ...) implementation. I would not worry to use it's built in pooling capabilities, but would take care that my code does not know (or know as little as possible) about it.
Giriraj Bhojak
Ranch Hand

Joined: Apr 03, 2008
Posts: 71
that's what i thought too...
it would be better to opt for a stable tool like dbcp to handle it for my application.
Thanks a lot for replying.

Regards,
Giriraj.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using connection pooling for a standlone java application
 
Similar Threads
JDBC Connection
why should i use connection pooling ?
JDBC Connection Pooling Framework
Java Database connection
Connection Pooling- For Stand Alone Application