posted 18 years ago
Stateless session beans cannot implement the SessionSynchronisation interface because they cannot maintain a transaction after a method has finished.
Stateful session beans can keep a transaction open across multiple method invocations, but they have a problem: how can they know when to synchronize themselves with a database? As they do not have the entity beans' ejbLoad() and ejbStore() methods, an alternative system is needed. That system is the SessionSynchronisation interface, which defines when a transaction starts, when a transaction is about to end, and when a transaction is finished (the afterBegin(), beforeCompletion() and afterCompletion() methods respectively).
SCJP 1.4, SCWCD 1.3, SCBCD 1.3