Transactions Section Index | Page 2
How are JMS, JTS, JTA, RMI, EJB, and CORBA related?
They are all components of the Java 2 Enterprise Edition. See http://java.sun.com/j2ee/ for information on the J2EE technologies.
My session beans call other bean methods within a transaction. Using bean-managed transactions, how should I take care of commit and rollback ?
There are two steps here:
1. Coding step:
public class exBean implements SessionBean {
EJBContext ec;
javax.transaction.UserTransaction utxn;
.
.
.
utxn = ec.getUserTrans...more
Are there any good books about transactions (especially w.r.t. to Java)?
The Programming with Enterprise JavaBeans, JTS, and OTS book from Andreas Vogel and Madhavan Rangarao is rumored to be good, though it is approaching a year old. The Java Enterprise in a Nutshell ...more
What newsgroups and mailing lists are available for discussing transactions?
What newsgroups and mailing lists are
available for discussing transactions?
What is two-phase commit?
A commit operation is, by definition, an all-or-nothing affair. If a series of operations bound as a transaction cannot be completed, the rollback must restore the system (or cooperating systems)...more
Can a JMS client obtain a JTA UserTransaction object?
The JMS specification does not require that JMS implementations support distributed transactions. If a JMS implementation supports distributed transactions, it's likely that it will do so through...more
How does a JTS transaction manager perform an xa_open operation?
In the distributed Java world, resource manager initialization is handled automatically upon resource connection.
Note that the XAResource interface differs from the standard X/Open XA interface; ...more
How does a client use the javax.transaction.xa package?
Clients do not use this package. This package prescribes functionality that is used by JTS transaction managers when managing global transactions involving one or more resources such as database ...more
How does a client use the javax.jts package?
Clients do not use this package. This package prescribes functionality that is implemented by JTS transaction managers.
How does a client use the javax.transaction package?
Typically, a client that needs to perform multiple operations within a transactional unit simply obtains a UserTransaction object and uses its services. These services include:
begin()
commit()
...more
Is it possible for server-side applications, for example, a JMS application, to play the role of a resource in a distributed transaction?
Under certain conditions, yes. In this particular case, the JMS server would have to implement the appropriate resource-related interfaces in javax.transaction.xa so that the JTS transaction mana...more
Is an EJB, JMS, or general-purpose Java application server a transaction manager?
It depends on the server implementation. The JTA and JTS specifications define client-, application-, and transaction manager-level operations. There is nothing to prevent a Java application ser...more
Is it necessary for an entity bean to protect itself against concurrent access from multiple transactions?
No. One of the motivations for using a distributed component architecture such as Enterprise JavaBeans is to free the business logic programmer from the burdens that arise in multiprogramming sce...more
How does an entity bean obtain a JTA UserTransaction object?
It doesn't. Entity beans do not employ JTA transactions; that is, entity beans always employ declarative, container-managed transaction demarcation. Entity beans, by definition, are somewhat tig...more
How do you configure the transaction characteristics for a session bean with container-managed transactions?
You must set trans-attribute in the deployment descriptor.