Patrick Yang [http://community.jboss.org/people/patrickyang] created the 
discussion

"Can Human Task component work with JTA"

To view the discussion, visit: http://community.jboss.org/message/621185#621185

--------------------------------------------------------------
Hi Krisv,

I am trying to control JBPM5 Process Engine / Human Task / Histroy Log / My own 
application in one atomic transaction using JTA.
Currently I already configured Process Engine / Histroy Log  / My own 
application with JTA (BTM implemenation), but failed to include Human Task in.
It will always report "A JTA EntityManager cannot use getTransaction()" 
exception, I tracked the source code, it was because, below code always call 
getTransaction, and it was not allowed when we config Human Task persistence 
unit as JTA. 


Can you give me some suggestion?

Thanks

 private void doOperationInTransaction(final TransactedOperation operation) {
        final EntityTransaction tx = em.getTransaction();
        try {
            if (!tx.isActive()) {
                tx.begin();
            }
            operation.doOperation();
            tx.commit();
        } finally {
            if (tx.isActive()) {
                tx.rollback();
            }
        }

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/621185#621185]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to