Code example for DefaultFlushEventListener

 * In EJB3, it is the create operation that is cascaded to unmanaged entities at flush time (instead of the 
 * save-update operation in Hibernate). 
 * @author Gavin King 
public class EJB3FlushEventListener extends DefaultFlushEventListener implements HibernateEntityManagerEventListener { 
	public static final FlushEventListener INSTANCE = new EJB3FlushEventListener(); 
	protected CascadingAction getCascadingAction() { 
		return CascadingAction.PERSIST_ON_FLUSH; 
	protected Object getAnything() { 
		return IdentityMap.instantiate( 10 ); 
Experience pair programming with AI  Get Codota for Java