Posted on 2007-03-06 12:49
rednight 阅读(230)
评论(0) 编辑 收藏
Some XA JDBC drivers do not support local transaction operations, which can cause an error similar to the following when optimistic concurrency is used with such a driver:
SQL operations are not allowed with no global transaction by default for XA drivers.
In other words, the error will occur when
SupportsLocalTransactions="true"
is specified for the JDBCConnectionPool.
This problem occurs because optimistic concurrency suspends a global transaction and does reads in a local transaction when the database is not Oracle. (When using Oracle, you can avoid this problem by explicitly setting
<database-type>Oracle</database-type>
in your CMP deployment descriptor.)
Workaround
: Use the "RollbackLocalTxUponConnClose" on the JDBCConnection.