Q&A

Q1:How is a local transaction different from a distributed transaction?
A1: A local transaction manages only a single resource manager, such as a database or a JMS provider. This is managed by setting methods of the JDBC Connection object or the JMS Session object. On the other hand, a distributed transaction is a global in a sense, and is used to access multiple resource managers. JTA is used to coordinate and manage both local and distributed transaction through the UserTransaction interface.
Q2:What are the main resource managers used in a J2EE distributed transaction?
A2: Three types of resource-managers can participate in a J2EE distributed transaction: JDBC, JMS, and JCA resource managers.

Get Sams Teach Yourself EJB in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.