File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes connection thread safe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "connection thread safe" Watch "connection thread safe" New topic

connection thread safe

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8927

Is JDBC connection thread safe ?
When a connection is shared by many threads on problem I see is the transaction isolation level.
Any other problems ? Would like to hear them.

Taudo Wenzel

Joined: Mar 06, 2001
Posts: 8
the Connection class is not thread save.
Don't use it. How would you maintain
transactions over multiple threads with only one Connection?
Makes your code only more complicated.
[ August 03, 2003: Message edited by: Taudo Wenzel ]
I agree. Here's the link:
subject: connection thread safe
It's not a secret anymore!