Skip Headers

# Local Transactions

Previous

Next

Some EJB containers (such as OC4J) support writing without an active JTA transaction.

If you execute a bean method outside a JTA transaction while the transaction attribute (see "CMP Transaction Attribute") is set to `Supports`, `NotSupported`, or `Never`, TopLink performs the operation within a local unit of work and commits the unit of work at the end of the method. This unit of work is referred to as a local transaction.

The reason for this is because the update semantics in the EJB specification are left undefined for these scenarios, and a proper transactional model demands that a transaction be active before being able to modify data. TopLink also requires change operations to occur within a unit of work to ensure that the session cache remains consistent.