How does a client application create a transaction object?
Location: http://www.jguru.com/faq/view.jsp?EID=2566 Created: Dec 14, 1999 Modified: 2000-08-03 22:25:31.928 Author: Jerry Smith (http://www.jguru.com/guru/viewbio.jsp?EID=9) How you gain access to UserTransaction objects varies depending on the type of client. Enterprise JavaBeans provides two types of transaction management: • Container-managed transactions. As the name implies, the EJB container makes the decisions (based on the deployment descriptor’s trans-attribute setting) regarding how to bundle operations into transactions and then works with the transaction manager, which manages the transaction processing. • Bean-managed transactions. In this case, a session bean obtains the UserTransaction object via the EJBContext using the getUserTransaction() method. JMS clients can bundle several messages in a transaction simply by using a transactional session–a UserTransaction object is not required. To create a transactional session, use either QueueConnection.createQueueSession() o