For session beans, we can use the SessionSynchronization interface. For entity beans, how do we have control over a transaction?

Anoop Sehdev

The SessionSynchronization interface is used by the Session beans to Synchronize the Instance variables after a rollback or after a commit operation, because container does not have any other way to inform the bean of these operations.

With Entity beans, this is not a problem as the Container automatically calls the ejbLoad method that refreshed the values from the database.

I hope it clarifies the doubt.