Is there an open-source solution to XA-transactional file access in Java?
Asked Answered
H

4

7

Is it possible to make XA-transactional access to the file system in Java? I want to manipulate files within the boundaries of a transaction and my transaction must participate in a distributed transaction via JTA (so I guess the file system needs to be accesses as a XAResource). I don't need support for fine-grained read/write file access; treating each file as a record is good enough for my needs.

Does anybody know an open-source project that already does this? I don't feel like implementing this mess just to find out that it's already been done...

I heard some rumors that JBoss Transcations will add support for this (see for example this discussion) but couldn't find an official statement about this.

By the way, if you need transactional file access but don't require the transaction to participate in a 2-phase commit I recommend you have a look at Apache Commons Transaction

A nice article about the complexities involved can be found in here.

Hafner answered 21/5, 2009 at 10:55 Comment(1)
I done some searching on this recently and the only thing I came across was the JBoss code.Autosuggestion
F
3

Recently I solved exactly the same problem. Finally I used Bitronix with XADisk.

You can find more details in my blog post: JTA transaction manager – Atomikos or Bitronix?

Finnic answered 30/11, 2011 at 13:8 Comment(0)
S
6

XADisk can get you what you are looking for. It's free and open source.

Stoke answered 16/3, 2010 at 20:50 Comment(0)
B
3

At the time the JBoss Transactions intern started there was no XA capable file system driver for Java. I've not checked more recently, but nor have I seen any news about similar work. The work that Ioannis did during his internship is available if you want to use it, but not under active development at present. Unless you want to become an open source contributor :-)

At some point in the future when we have the time and/or customer demand we may roll this functionality into the product. Meanwhile it's at www.jboss.org/jbosstm/fileio/ and the original project discussion is at www.jboss.org/community/wiki/JBossTSProjects

Jonathan Halliday
JBossTS dev team

Burrell answered 21/5, 2009 at 13:30 Comment(1)
Thanks Jonathan! I'll get the JBossTM code and will give it a try... From what I've found, this seems like the best (open) effort done so far. Strange, I would think many people needed this functionality. Thanks again, OriHafner
F
3

Recently I solved exactly the same problem. Finally I used Bitronix with XADisk.

You can find more details in my blog post: JTA transaction manager – Atomikos or Bitronix?

Finnic answered 30/11, 2011 at 13:8 Comment(0)
L
0

At Atomikos we did this about 10 years ago but dropped the idea due to lack of demand.

We could resume our efforts if there is sufficient reason to do so.

Logomachy answered 21/5, 2009 at 20:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.