Apr 12th, 2007, 02:50 PM
Commons transaction and Spring
Have anyone used commons transaction with Spring? I got a service who writes to both database and filesystem, this must be done inside a transaction (XA). The service uses 2 DAO's, one for DB and another one for FS. The transaction is set set using spring xml config on the service layer (at the moment it only works for DB DAO). Has anyone done anything like this before me?
Apr 12th, 2007, 03:21 PM
You can simply configure a JTATransactionManager in Spring. Just make sure your datasource and filesystem access is XA enabled and you should be good to go.
Search the forum because I'm sure it came up before.
Apr 13th, 2007, 05:42 AM
I have enabled XA in DB transactions using Spring and JOTM (running Tomcat). How do i configure commons transaction to use XA in Spring config, any idea/sample.
Thanks in advance!
Apr 13th, 2007, 05:52 AM
The file system access in Commons Transaction is not yet XA enabled, but it's planned.
Apr 13th, 2007, 06:19 AM
you have to wait till its JTA enabled then........
JTA transaction Manager works only with XA enabled resources
Apr 13th, 2007, 07:19 AM
Apr 15th, 2007, 08:34 AM
Thanks for replaying to my question guys. I have to make a "work-around" for my problem then..
Apr 16th, 2007, 12:35 PM
Apr 16th, 2007, 03:54 PM
Feb 12th, 2012, 03:43 AM
Commons Transaction does not support XA transactions, afaik. You can use XADisk to perform the file operations inside the XA transaction. This same XA transaction can include other XA-enabled resources like database also.
Hope that helps.