Based on various studies, I understand that the use of XA Transaction brings down the performance of database updates compared to the non-XA transaction. In our web application, 90% of the EJBs we have deals with only a single database/resource. Only the remaining 10% of the EJBs does updates into either multiple databases or one database + JMS. Since the use of XA JDBC driver brings down the performance, I would like to know if we could selectively use XA for this 10% of the EJBs only, so that the majority 90% of the EJBs don't suffer the performance bottleneck.
We are using MySql database.
I would appreciate any thoughts in this area.
There is nothing wrong with this. However, JBoss will detect when only a single resource is used in the context of an XATransaction. If this is the case, the 1Phase resource optimization will be used thus avoiding the overhead of the full 2PC protocol.