April 2018
Intermediate to advanced
382 pages
10h 11m
English
The first thing we did was mark our bean to hold states and have its transactions managed by the server:
@Stateful@TransactionManagementpublic class UserBean { ...}
What happens then? If you note, no method that deals with adding or removing stuff does any transaction management. But they are still managed:
Transaction started 1 added Transaction will be commited Transaction commited? true
So you have all the transaction intelligence without writing a single line of transaction stuff.
It will transact even when the bean would releases its resources:
Transaction started User logout. Resources will be released. UserBean will be destroyed Transaction will be commited Transaction commited? true
Read now
Unlock full access