if you use BMT there is no need to do any special configuration in jBPM as it will use JTA (UserTransaction) to manage transaction. Just make sure that you start transaction before you invoke any jBPM operations.
Please use jBPM user forum for jBPM related questions - much higher changes to get responses.
Thanks for the reply Maciej! Forgot to mention that I'm running the application in WebSphere 7 with Spring 3 and Hibernate 4. Basically I start my process from the first MDB and inside this bean I'll be sending new JMS messages to trigger the next MDB to continue the workflow. The issue here is that it seems the JBPM is running its own JBPM JTA transaction instead of using the current MDB context's user transaction. JMS messages were put into queue once the MDB's user transaction is committed. So maybe at some point in time, the next MDB is already getting the process instance but the lock is still in the previous MDB's JBPM user transaction that causes optimistic locking exceptions.
Sorry I'm just new in the group. I really appreciate your help!
make sure your queue is transactional as it might be that second MDB starts to process the message before first MDB is committed and thus causing optimistic lock exceptions.