FileDocCategorySizeDatePackage
BeanStateSynchronization.javaAPI DocGlassfish v2 API3518Fri May 04 22:33:12 BST 2007com.sun.ejb.spi.container

BeanStateSynchronization

public interface BeanStateSynchronization
There are cases where the container would need to interact with the persistence manager. Some known cases are listed below 1. provide the user with a mechanism to flush changes to the database at the end of a method with out waiting until the end of the transaction. 2. for read only beans provide a mechanism to have the master copy of the bean sync up with the database record. Currently the bean concrete implementation that is created as part of the codegen would implement this interface.
author
Pramod Gopinath

Fields Summary
Constructors Summary
Methods Summary
public voidejb__flush()
Provides a mechanism to flush changes to the database w/o waiting for the end of the transaction, based on some descriptor values set by the user. The container would call this method in the postInvoke(), only if the flush is enabled for the current method and there were no other exceptions set into inv.exception.

public voidejb__refresh(java.lang.Object primaryKey)
On receiving this message the PM would update its master copy by fetching the latest information for the primary key from the database

public voidejb__remove(java.lang.Object primaryKey)
On receiving this message the PM would delete from its master copy the details related to the primaryKey