Transactions in Web Components
You can demarcate a transaction in a web component by using either the
java.sql.Connection
orjavax.transaction.UserTransaction
interface. These are the same interfaces that a session bean with bean-managed transactions can use. Transactions demarcated with theConnection
interface are discussed in the section JDBC Transactions, and those with theUserTransaction
interface are discussed in the section JTA Transactions. For an example of a web component using transactions, see Accessing Databases.