Oracle JDBC driver and connection thread safety
Oracle JDBC developer guide recommends not to share connections across multiple threads. Here is small excerpt from the Oracle guide
“Oracle JDBC drivers provide full support for, and are highly optimized for, applications that use Java multithreading. Controlled serial access to a connection, such as that provided by connection caching, is both necessary and encouraged. However, Oracle strongly discourages sharing a database connection among multiple threads. Avoid allowing multiple threads to access a connection simultaneously. If multiple threads must share a connection, use a disciplined begin-using/end-using protocol.”
Posted on May 28, 2011, in oracle-jdbc and tagged jdbc, oracle. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0