Managing
transactions

EJB clients can begin transactions using the javax.transaction.UserTransaction interface.
Obtain an instance from the initial naming context by resolving
the name javax.transaction.UserTransaction. For
example:

You can call the begin(), commit(),
and rollback() methods to begin and end transactions.
You can enlist multiple component methods in a transaction, with these
restrictions:

Each method must
allow inheritance of an existing transaction context. That is, the
method’s transaction attribute must be Supports, Requires,
or Mandatory. Methods with other transaction attributes run outside
the scope of your transaction. See “Component properties: Transactions” for more information on transaction
attributes.

All components must be on the
same server, and all must use the same transaction coordinator.