JdbcAuditor fails on JBoss
--------------------------
Key: SM-742
URL: https://issues.apache.org/activemq/browse/SM-742
Project: ServiceMix
Issue Type: Bug
Components: servicemix-core
Affects Versions: 3.1
Environment: JBoss 4.0.4.GA, SM 3.x (all Versions affected)
Reporter: Frank Trietsch
Priority: Minor
The JdbcAuditor handles JDBC connections in a way which does not work correctly
inside JBoss, not dependent on the kind of datasource being used. This is due
to explicit calls to Connection.commit().
a) Transactional datasources
When using transactional datasources inside a transactional context, all
subsequent calls to DataSource.getConnection() create a managed connection.
Explicit calls to commit() are not allowed on them.
b) Non-transactional datasources
In JBoss, non-tx datasources are created with autocommit by default. So calls
to commit() are not allowed to them either.
Using non-tx datasources and changing the JdbcAuditor to call
setAutoCommit(false) on all connections worked for me. Would be great if you
can apply that to the original code.
Cheers,
Frank
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira