jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KÖLL Claus <C.KO...@TIROL.GV.AT>
Subject AW: using javax.transaction.UserTransaction with JackRabbit 2.4.3
Date Wed, 03 Jul 2013 06:45:08 GMT
Hi Ferdinand,

Of course we use jackraabit a long time with transactions ...

Here is a doku how to configure jackrabbit to use transactions...
http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss

greets
claus


-----Ursprüngliche Nachricht-----
Von: Malzer Ferdinand OSP sIT [mailto:Ferdinand.Malzer@s-itsolutions.at] 
Gesendet: Mittwoch, 3. Juli 2013 08:31
An: users@jackrabbit.apache.org
Betreff: AW: using javax.transaction.UserTransaction with JackRabbit 2.4.3

Hello again,

Does anybody know documentation how to use transactions with JackRabbit 2.4.3 beyond the stuff
of chapter 21 of the JCR 2.0 spec?

ferry malzer


-----Ursprüngliche Nachricht-----
Von: Malzer Ferdinand OSP sIT 
Gesendet: Freitag, 21. Juni 2013 14:28
An: users@jackrabbit.apache.org
Betreff: AW: using javax.transaction.UserTransaction with JackRabbit 2.4.3

Hello,
Is there anybody who successfully uses transactions with JackRabbit?

ferry malzer

-----Ursprüngliche Nachricht-----
Von: Malzer Ferdinand OSP sIT 
Gesendet: Mittwoch, 19. Juni 2013 16:31
An: users@jackrabbit.apache.org
Betreff: using javax.transaction.UserTransaction with JackRabbit 2.4.3

Hello,
In JackRabbit the query of Repository.OPTION_TRANSACTIONS_SUPPORTED return true.
Therefore we want to use javax.transaction.UserTransaction with JackRabbit.

What we want to do is shown in the following simplified pseude-code:


        Session session = null;
        UserTransaction tx = null;
        try {
            session = login(...);

            tx = new UserTransactionImpl();
            tx.begin();

            //delete a node persisted in JackRabbit
            Node node = session.getNode(path);
            node.remove();
            session.save();

            //delete resources persisted in another XA datasource
            cleanOtherDBResources();

	doSomeOtherCode();

            tx.commit();

        } catch (Exception e) {
            if (tx != null) { tx.rollback();}
        } finally {
            if (session != null) { session.logout();}
        }


When in doSomeOtherCode() an exception is thrown, than the steps done in cleanOtherDBResources()
are roll-back but JackRabbit's node.remove() is not roll-back.

Perhaps I miss some configuration issues to use JackRabbit in a UserTransaction correctly.

Does somebody know how to use javax.transaction.UserTransaction in a JackRabbit environment?
Thx in advance!

ferry malzer

Mime
View raw message