openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1800491 - /openwebbeans/trunk/webbeans-se/src/main/java/org/apache/openwebbeans/se/OWBContainer.java
Date Sat, 01 Jul 2017 11:20:34 GMT
Author: rmannibucau
Date: Sat Jul  1 11:20:34 2017
New Revision: 1800491

URL: http://svn.apache.org/viewvc?rev=1800491&view=rev
Log:
abstracting OWBContainer#close logic

Modified:
    openwebbeans/trunk/webbeans-se/src/main/java/org/apache/openwebbeans/se/OWBContainer.java

Modified: openwebbeans/trunk/webbeans-se/src/main/java/org/apache/openwebbeans/se/OWBContainer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-se/src/main/java/org/apache/openwebbeans/se/OWBContainer.java?rev=1800491&r1=1800490&r2=1800491&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-se/src/main/java/org/apache/openwebbeans/se/OWBContainer.java
(original)
+++ openwebbeans/trunk/webbeans-se/src/main/java/org/apache/openwebbeans/se/OWBContainer.java
Sat Jul  1 11:20:34 2017
@@ -37,8 +37,8 @@ import java.util.concurrent.atomic.Atomi
 
 public class OWBContainer implements SeContainer
 {
-    private final WebBeansContext context;
-    private final Object startEvent;
+    protected final WebBeansContext context;
+    protected final Object startEvent;
     private AtomicBoolean running = new AtomicBoolean(true);
 
     // let's it be public in case we extend it
@@ -48,12 +48,17 @@ public class OWBContainer implements SeC
         this.startEvent = startObj;
     }
 
+    protected void doClose()
+    {
+        context.getService(ContainerLifecycle.class).stopApplication(startEvent);
+    }
+
     @Override
     public void close()
     {
         if (running.compareAndSet(true, false))
         {
-            context.getService(ContainerLifecycle.class).stopApplication(startEvent);
+            doClose();
         }
     }
 



Mime
View raw message