From 05073135390b204c9433d94abce9120b00489816 Mon Sep 17 00:00:00 2001 From: Srinivasa Segu Date: Fri, 5 Jan 2007 19:36:06 +0000 Subject: [PATCH] Fix to retain original FM because of the possibility of reentrant calls git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@493156 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/openjpa/kernel/StateManagerImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 43e136cbc..5f21a98fc 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 @@ -2844,9 +2844,11 @@ public class StateManagerImpl * field manager. */ void provideField(PersistenceCapable pc, FieldManager store, int field) { + FieldManager beforeFM = _fm; _fm = store; pc.pcProvideField(field); - _fm = null; + // Retaining original FM because of the possibility of reentrant calls + _fm = beforeFM; } /** @@ -2854,9 +2856,11 @@ public class StateManagerImpl * field manager. */ void replaceField(PersistenceCapable pc, FieldManager load, int field) { + FieldManager beforeFM = _fm; _fm = load; pc.pcReplaceField(field); - _fm = null; + // Retaining original FM because of the possibility of reentrant calls + _fm = beforeFM; } /**