Meaningless Drivel is fun!
The moose likes JDBC and Relational Databases and the fly likes connection pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "connection pooling" Watch "connection pooling" New topic

connection pooling

Tim Johnsen

Joined: Oct 13, 2005
Posts: 12
I want to return a connection in my class if there is an SQL error. I am currently doing this now with a finally block but is there any other way to achieve this?
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3749

A catch block can redirect on exceptions.

[OCA 8 Book] [Blog]
It is sorta covered in the JavaRanch Style Guide.
subject: connection pooling
It's not a secret anymore!