[jboss-user] [jBPM] - Can Human Task component work with JTA

Patrick Yang do-not-reply at jboss.com
Tue Aug 16 03:49:43 EDT 2011


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]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110816/0b5af2b1/attachment.html 


More information about the jboss-user mailing list