avoid duplicate event call

git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@451011 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Kim 2006-09-28 20:18:07 +00:00
parent d833950424
commit f104321da8
1 changed files with 3 additions and 1 deletions

View File

@ -2633,7 +2633,9 @@ public class StateManagerImpl
* for all strategies that don't require flushing.
*/
void preFlush(boolean logical, OpCallbacks call) {
if (isPersistent()) {
boolean second = (_flags & FLAG_PRE_FLUSHED) != 0;
if (isPersistent() && !second) {
fireLifecycleEvent(LifecycleEvent.BEFORE_STORE);
_flags |= FLAG_PRE_FLUSHED;
}