From f104321da80a5a17170f910b2ecb63fa331aee26 Mon Sep 17 00:00:00 2001 From: Stephen Kim Date: Thu, 28 Sep 2006 20:18:07 +0000 Subject: [PATCH] avoid duplicate event call git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@451011 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/openjpa/kernel/StateManagerImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java index 444a920ea..907c2216a 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java @@ -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; }