Shared Transactions

Hi,

I’m using bonita 6.3 with glassfish 3.1 and it works fine.

However, I don’t manage to use shared transactions as explain in Bonita 6.3 documentation.

I think my problem is coming from the object “txManager” used to open/commit/rollback transaction.
The documentation don’t explain how to get this object so I try the following method :

UserTransaction txManager = null; try { String jndiName="java:comp/UserTransaction"; txManager = (UserTransaction) new InitialContext().lookup(jndiName); txManager.begin(); ... } catch (Exception e) { System.out.println("rollback transaction ..."); txManager.rollback(); e.printStackTrace(); }

When my activity launch an exception, I rollback the transaction but it only put my activity in a failed state.

Please help on how to get this objet “txManager”.

Thanks in advance.