You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2017/10/29 08:24:27 UTC

[isis] 01/02: ISIS-1756: IsisContext: add destroy(), deprecate testReset()

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch dev/2.0.0/ISIS-1767-jee-7
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 05e7a96175169e1c3650800119b9d1a7c848bc2d
Author: Andi Huber <ah...@apache.org>
AuthorDate: Fri Oct 27 16:41:43 2017 +0200

    ISIS-1756: IsisContext: add destroy(), deprecate testReset()
---
 .../isis/core/runtime/system/context/IsisContext.java     | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
index 495458b..dd63f0f 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
@@ -72,13 +72,24 @@ public final class IsisContext {
         }
         IsisContext.sessionFactory = sessionFactory;
     }
-
-
+    
     /**
      * Resets
+     * @deprecated replaced by {@link #destroy()}
+     * 
      */
+    @Deprecated
     public static void testReset() {
+    	destroy();
+    }
+    
+    /**
+     * Destroys this context and clears any state associated with it. 
+     * It marks the end of IsisContext's lifecycle. Subsequent calls have no effect. 
+     */
+    public static void destroy() {
         sessionFactory = null;
+        metamodelInvalidException = null;
     }
 
     //endregion

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.