The currently-released version of HSQLDB, 1.8.0, doesn’t support XA transactions (though I see work thereon in the trunk). This doesn’t please Bitronix, which declares the situation an unsafe one in which to start up:
bitronix.tm.utils.InitializationException: recovery failed, cannot safely start the transaction manager ... Caused by: bitronix.tm.resource.ResourceConfigurationException: property <className> for resource <ds1> in resources configuration file must be the name of a class implementing either javax.sql.XADataSource or javax.jms.XAConnectionFactory
(To be fair, it’s hardly Bitronix’s fault we supplied it with a class that didn’t implement a required interface!)
Hmm… will we:
- Wait for HSQLDB version 1.9.0, which may have the XA support? 1.9.0’s not reached its first alpha release yet (though apparently it could be here any time now)…
- Try an HSQLDB nightly build that at least has something that implements javax.sql.XADataSource? Mmm, probably not a good idea for stability’s sake.
Or maybe we should try the H2 database engine, which already supports XA transactions and boasts a javax.sql.XADataSource-implementing JdbcDataSource class to back that up? I wonder how much of our testing infrastructure that would gum up, changing test-databases.
Update 8/21/2008 – There’s a way around this limitation — see comment #1!
Have a look at this: http://docs.codehaus.org/display/BTM/LastResourceCommit
Wow, is there anything you haven’t thought of? :) I’ll have to have a look at this.
Update: I’ve got it working using Last Resource Commit, with a single participating resource.