You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2014/09/12 18:14:42 UTC
git commit: ISIS-643: similar fix in preDelete processing.
Repository: isis
Updated Branches:
refs/heads/master ad8f8a82c -> eb5b2b07f
ISIS-643: similar fix in preDelete processing.
But here, rather than an NPE guard, instead force the adapter to be loaded such that it can be enlisted in the xactn.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/eb5b2b07
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/eb5b2b07
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/eb5b2b07
Branch: refs/heads/master
Commit: eb5b2b07f1191b92fb32993e625d15d594e6c8e2
Parents: ad8f8a8
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Sep 12 17:14:28 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Sep 12 17:14:28 2014 +0100
----------------------------------------------------------------------
.../datanucleus/persistence/FrameworkSynchronizer.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/eb5b2b07/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/FrameworkSynchronizer.java
----------------------------------------------------------------------
diff --git a/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/FrameworkSynchronizer.java b/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/FrameworkSynchronizer.java
index af75db2..94e9c34 100644
--- a/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/FrameworkSynchronizer.java
+++ b/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/FrameworkSynchronizer.java
@@ -283,7 +283,7 @@ public class FrameworkSynchronizer {
withLogging(pojo, new Runnable() {
@Override
public void run() {
- ObjectAdapter adapter = getAdapterManager().getAdapterFor(pojo);
+ ObjectAdapter adapter = getAdapterManager().adapterFor(pojo);
final IsisTransaction transaction = getCurrentTransaction();
transaction.enlistDeleting(adapter);
@@ -307,7 +307,15 @@ public class FrameworkSynchronizer {
adapter.changeState(ResolveState.DESTROYED);
}
- CallbackFacet.Util.callCallback(adapter, RemovedCallbackFacet.class);
+
+ // previously we called the removed callback (if any).
+ // however, this is almost certainly incorrect, because DN will not allow us
+ // to "touch" the pojo once deleted.
+ //
+ // CallbackFacet.Util.callCallback(adapter, RemovedCallbackFacet.class);
+
+
+ // this is probably still ok to do, however.
ensureFrameworksInAgreement(pojo);
}
}, calledFrom);