-
Entity beans are intended to work within transactions
-
However, unlike most transactional systems, transactions are not managed by
code
-
The transactional behaviour is specified in the deployment descriptor
-
The deployment descriptor is an XML file supplied with the bean(s)
-
Example 18 shows a
portion of the Auction system's deployment descriptor
-
Descriptor specifies Required as the transactional attribute for all
methods on Bid
-
This is the normal specification for an entity bean
-
Methods must execute in a transaction
-
If there is no transaction at the start of the method, the container starts one
-
If there is a transaction, it is just used
|