Hi Ronald,
Thank you for your reply. I followed up with our architect and have more details to provide on how our application uses XA, as well as some more specifics on our performance test findings and interepretation.
We're interested in XA because our Activiti processes not only do database operations but also send out JMS messages: if there's a database error along the way, we don't want any of the JMS messages to go out. We've coded the application in a way that makes such consistency reasonably certain (i.e. we batch up the JMS messages and don't send them until the very end), but are considering XA as a way to simplify this aspect of our application code.
We had previously configured our JMS resources to participate in XA, so when we changed from a non-XA JDBC driver to an XA JDBC driver, the database operations were then without any further configuration changes enlisted in the same global transaction as was the JMS operations.
Here's more specifics on what the architect observed on the Oracle server during our performance testing:
When not using XA, about 1/2 the time was being spent in CPU and the other half was spent doing commits. This is likely because Activiti is by design (as a workflow engine, not a batch processing engine) submitting large numbers of small transactions (i.e. one transaction for each state transition). We're not seeing this as a deficiency in Activiti, just an operating characteristic. As I mentioned before, we are in general very pleased with the performance (and other aspects) of Activiti.
In contrast to the non-XA results, when using XA, very little time was spent doing commits, and most of the time was spent in concurrency wait operations. Why this difference between XA and non-XA? Here's one theory: In the architect's experience, she's seen a JMS message to take about 30msec to send, a fairly long time compared to operations such as a JDBC commit. In a non-XA environment, this work can be done in parallel with the database commits. But in an XA environment, these JMS operations are committed serially with the JDBC commits, which would lead to lower throughput. This change from parallel to serial processing may well explain the above changes in resource utilization that she observed.
Hopefully the above information sheds some light on your questions.
I'm still interested in any performance findings that you or anyone else may have on using Activiti with XA, so as to judge the representativeness of our team's findings.
Thanks again,
Brian