Query - SessionSynchronization interface

Ashwin Jahagirdar

Greenhorn

Posts: 1

posted 10 years ago

Stateless session beans are not allowed to maintain transactions across multiple methods, so they must not implement SessionSynchronization interface. Does this mean that stateful CMT session bean is able to maintain transactions across multiple methods ? In CMT, transaction attributes are scoped at method level so how is it possible to maintain a transaction across multiple methods ?

TeGo Gokhale

Greenhorn

Posts: 11

posted 10 years ago

I think maintaining state and transaction should be looked seperately. Session synchronizatiion int. gives chance to keep bean synchronized with underlying per. store and key milestones during a transaction. This is important for stateful bean because it has to maintain a state accross method calls. So ss interface is for synching the bean state accross method calls.

CMT stateful session beans cannot continue transaction accross method calls but still have to be synched with underlying datastore.