deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject git commit: DELTASPIKE-669 If stop contexts were to fail, silently ignore. - Regression
Date Wed, 06 Aug 2014 11:47:22 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master de2686328 -> 39308d33f


DELTASPIKE-669 If stop contexts were to fail, silently ignore. - Regression


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/39308d33
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/39308d33
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/39308d33

Branch: refs/heads/master
Commit: 39308d33f351aabfe7cf98e904c4f2f4a34d8268
Parents: de26863
Author: John D. Ament <johndament@apache.org>
Authored: Wed Aug 6 07:47:19 2014 -0400
Committer: John D. Ament <johndament@apache.org>
Committed: Wed Aug 6 07:47:19 2014 -0400

----------------------------------------------------------------------
 .../cdise/openejb/OpenEjbContainerControl.java  |  9 ++++++++-
 .../cdise/owb/OpenWebBeansContainerControl.java |  9 ++++++++-
 .../cdise/weld/WeldContainerControl.java        | 21 ++++++++++++++++----
 3 files changed, 33 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/39308d33/deltaspike/cdictrl/impl-openejb/src/main/java/org/apache/deltaspike/cdise/openejb/OpenEjbContainerControl.java
----------------------------------------------------------------------
diff --git a/deltaspike/cdictrl/impl-openejb/src/main/java/org/apache/deltaspike/cdise/openejb/OpenEjbContainerControl.java
b/deltaspike/cdictrl/impl-openejb/src/main/java/org/apache/deltaspike/cdise/openejb/OpenEjbContainerControl.java
index 59408a0..22a14ec 100644
--- a/deltaspike/cdictrl/impl-openejb/src/main/java/org/apache/deltaspike/cdise/openejb/OpenEjbContainerControl.java
+++ b/deltaspike/cdictrl/impl-openejb/src/main/java/org/apache/deltaspike/cdise/openejb/OpenEjbContainerControl.java
@@ -115,7 +115,14 @@ public class OpenEjbContainerControl implements CdiContainer
     {
         if (ctxCtrl != null)
         {
-            ctxCtrl.stopContexts();
+            try
+            {
+                ctxCtrl.stopContexts();
+            }
+            catch (Exception e)
+            {
+                // contexts likely already stopped
+            }
             ctxCtrlBean.destroy(ctxCtrl, ctxCtrlCreationalContext);
         }
 

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/39308d33/deltaspike/cdictrl/impl-owb/src/main/java/org/apache/deltaspike/cdise/owb/OpenWebBeansContainerControl.java
----------------------------------------------------------------------
diff --git a/deltaspike/cdictrl/impl-owb/src/main/java/org/apache/deltaspike/cdise/owb/OpenWebBeansContainerControl.java
b/deltaspike/cdictrl/impl-owb/src/main/java/org/apache/deltaspike/cdise/owb/OpenWebBeansContainerControl.java
index 11ca596..c8c3671 100644
--- a/deltaspike/cdictrl/impl-owb/src/main/java/org/apache/deltaspike/cdise/owb/OpenWebBeansContainerControl.java
+++ b/deltaspike/cdictrl/impl-owb/src/main/java/org/apache/deltaspike/cdise/owb/OpenWebBeansContainerControl.java
@@ -80,7 +80,14 @@ public class OpenWebBeansContainerControl implements CdiContainer
     {
         if (ctxCtrl != null)
         {
-            ctxCtrl.stopContexts();
+            try
+            {
+                ctxCtrl.stopContexts();
+            }
+            catch (Exception e)
+            {
+                // contexts likely already stopped
+            }
             ctxCtrlBean.destroy(ctxCtrl, ctxCtrlCreationalContext);
         }
 

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/39308d33/deltaspike/cdictrl/impl-weld/src/main/java/org/apache/deltaspike/cdise/weld/WeldContainerControl.java
----------------------------------------------------------------------
diff --git a/deltaspike/cdictrl/impl-weld/src/main/java/org/apache/deltaspike/cdise/weld/WeldContainerControl.java
b/deltaspike/cdictrl/impl-weld/src/main/java/org/apache/deltaspike/cdise/weld/WeldContainerControl.java
index ccec4be..057575f 100644
--- a/deltaspike/cdictrl/impl-weld/src/main/java/org/apache/deltaspike/cdise/weld/WeldContainerControl.java
+++ b/deltaspike/cdictrl/impl-weld/src/main/java/org/apache/deltaspike/cdise/weld/WeldContainerControl.java
@@ -78,11 +78,24 @@ public class WeldContainerControl implements CdiContainer
     {
         if (ctxCtrl != null)
         {
-            ctxCtrl.stopContexts();
-            ctxCtrlBean.destroy(ctxCtrl, ctxCtrlCreationalContext);
+            try
+            {
+                ctxCtrl.stopContexts();
+                ctxCtrlBean.destroy(ctxCtrl, ctxCtrlCreationalContext);
+            }
+            catch (Exception e)
+            {
+                // contexts likely already stopped
+            }
+        }
+        try
+        {
+            weld.shutdown();
+        }
+        catch (Exception e)
+        {
+            // something caused weld to shutdown already.
         }
-
-        weld.shutdown();
         weld = null;
         ctxCtrl = null;
         ctxCtrlBean = null;


Mime
View raw message