Atomikos Forum |
|
My driver -- Data Direct -- defaults to autocommit=true and transaction isolation=1. The only way that I've been able to change that is to wrap the AtomikosDataSourceBean with my own class that overrides getConnection(). However, this means that the test command is executed in a local transaction so I can't use it.
I can't help but to think that there's a better way to set the isolation level and autocommit on my driver than this. Is there?
Okay, AutoCommit is not an issue. It appears that most driver developers ignore autocommit once an XA transaction is going on a connection which is kinda nice because you can do autocommit stuff when you need to on the same connection.
The isolation is more difficult. If you look at the Hibernate code you'll find that isolation is set in the DriverManagerConnectionProvider but not in the DataSourceConnectionProvider. I think that's a mistake. It really ought to be done in the DataSourceConnectionProvider. However, Atomikos uses the AtomikosConnectionProvider instead of the DataSourceConnection Provider. I should be pretty simple to add code to the AtomikosConnectionProvider to act on the hibernate hibernate.connection.isolation property when a new connection is retrieved from the pool If the changes are indeed as small as I think they are would you merge this into your next release? |