Why would a client application use JTA transactions?
– One possible example would be a scenario in which a client needs to employ two (or more) session beans, where each session bean is deployed on a different EJB server and each bean performs operations against external resources (for example, a database) and/or is managing one or more entity beans. In this scenario, the client’s logic could required an all-or-nothing guarantee for the operations performed by the session beans; hence, the session bean usage could be bundled together with a JTA UserTransaction object. In the previous scenario, however, the client application developer should address the question of whether or not it would be better to encapsulate these operations in yet another session bean, and allow the session bean to handle the transactions via the EJB container. In general, lightweight clients are easier to maintain than heavyweight clients. Also, EJB environments are ideally suited for transaction management.
Related Questions
- How do I get a reference to a VisiTransact Transaction Manager instance from a Java application that manages transactions using JTA?
- How does a client application that employs, say, session beans, obtain a JTA UserTransaction object from the EJB server?
- The BRMS Application Client overview positions the product for use with low volume data. What does that mean?