jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paco Avila <pav...@git.es>
Subject Re: Transactions with Jackrabbit?
Date Wed, 10 Oct 2007 16:44:24 GMT
El lun, 08-10-2007 a las 11:26 +0200, Stefan Ivanov escribió:
> You can see here:
> http://jackrabbit.apache.org/faq.html#using-jta
> 
> I use the spring-modules-0.8 with the jackrabbit 1.3.1 and I have bad
> expirience with it. Especially concurent acces to the same node and node
> versioning are not thread save. Thas's why i couldn't use versioning in my
> prototype system and have my own implementation.

I have some troubles with JTA. In my code I perform a node lock and a
checkout. If the checkout fails the lock should be rolledback, but... it
is not working :( 

try {
  xares.start(xid, XAResource.TMNOFLAGS);
  node.lock(true, false);

  ---> SOME EXCEPTION IS THROWN <---

  node.checkout();
  xares.end(xid, XAResource.TMSUCCESS);
  xares.prepare(xid);
  xares.commit(xid, false);
} catch (Exception e) {
  xares.prepare(xid);
  xares.rollback(xid);
}

-- 
GIT CONSULTORS 

www.git.es

Tel: +34 971 498 310
Fax: +34 971 496 189

C/ Francesc Rover, 2B. 
07003 Palma de Mallorca – Illes Balears (España)



Mime
View raw message