jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Malzer Ferdinand OSP sIT <Ferdinand.Mal...@s-itsolutions.at>
Subject AW: using javax.transaction.UserTransaction with JackRabbit 2.4.3
Date Fri, 21 Jun 2013 12:28:23 GMT
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

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();

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

            //delete resources persisted in another XA datasource



        } 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

View raw message