[jboss-jira] [JBoss JIRA] Created: (JBJCA-46) Unnecessary Locking in WrappedConnection and WrappedPreparedStatement
Deyan Bektchiev (JIRA)
jira-events at lists.jboss.org
Thu Mar 5 20:20:23 EST 2009
Unnecessary Locking in WrappedConnection and WrappedPreparedStatement
---------------------------------------------------------------------
Key: JBJCA-46
URL: https://jira.jboss.org/jira/browse/JBJCA-46
Project: JBoss JCA
Issue Type: Bug
Components: JDBC
Environment: Windows
Sun JDK 1.6
Reporter: Deyan Bektchiev
Assignee: Jesper Pedersen
The JBoss JDBC Connection and PreparedStatement wrapper classes all acquire and release a lock when entering and exiting most of their methods.
JDBC connections are not supposed to be thread safe and even if you coded your wrapper this way there is no guarantee that the underlying Connection would behave properly if accessed by multiple threads concurrently.
In one particular use case when profiling obtaining the locks for Statements (that obtain the Connection locks) took 5% of the total time.
I can provide a YourKit CPU profiler snapshot.
Regards,
Deyan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list