tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject [03/16] tomee git commit: TOMEE-1572 remove FailOverService
Date Tue, 05 May 2015 05:50:23 GMT
TOMEE-1572 remove FailOverService

FailOverService is not needed by OWB any longer
TOMEE-


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

Branch: refs/heads/fb_tomee2_owb16
Commit: c5632ef80b01e900daaf5a1c651577f79a67479b
Parents: e41c460
Author: Mark Struberg <struberg@apache.org>
Authored: Sat May 2 14:48:51 2015 +0200
Committer: Mark Struberg <struberg@apache.org>
Committed: Sat May 2 14:48:51 2015 +0200

----------------------------------------------------------------------
 .../openejb/cdi/ThreadSingletonServiceImpl.java |  7 -------
 .../server/httpd/BeginWebBeansListener.java     | 20 --------------------
 2 files changed, 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/c5632ef8/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java
b/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java
index fef83b3..5564b8f 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java
@@ -102,13 +102,6 @@ public class ThreadSingletonServiceImpl implements ThreadSingletonService
{
         properties.setProperty(OpenWebBeansConfiguration.APPLICATION_SUPPORTS_CONVERSATION,
"true");
         properties.setProperty(OpenWebBeansConfiguration.IGNORED_INTERFACES, "org.apache.aries.proxy.weaving.WovenProxy");
 
-        final String failoverService = startupObject.getAppInfo().properties.getProperty("org.apache.webbeans.spi.FailOverService",
-            SystemInstance.get().getProperty("org.apache.webbeans.spi.FailOverService",
-                null));
-        if (failoverService != null) {
-            properties.setProperty(OpenWebBeansConfiguration.IGNORED_INTERFACES, failoverService);
-        }
-
         final boolean tomee = SystemInstance.get().getProperty("openejb.loader", "foo").startsWith("tomcat");
 
         final String defaultNormalScopeHandlerClass = NormalScopedBeanInterceptorHandler.class.getName();

http://git-wip-us.apache.org/repos/asf/tomee/blob/c5632ef8/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/BeginWebBeansListener.java
----------------------------------------------------------------------
diff --git a/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/BeginWebBeansListener.java
b/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/BeginWebBeansListener.java
index acd4208..4a9b6e1 100644
--- a/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/BeginWebBeansListener.java
+++ b/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/BeginWebBeansListener.java
@@ -26,7 +26,6 @@ import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.el.ELContextStore;
 import org.apache.webbeans.spi.ContextsService;
-import org.apache.webbeans.spi.FailOverService;
 import org.apache.webbeans.util.WebBeansUtil;
 
 import javax.enterprise.context.RequestScoped;
@@ -35,7 +34,6 @@ import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
 import javax.servlet.ServletRequestEvent;
 import javax.servlet.ServletRequestListener;
-import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSessionActivationListener;
 import javax.servlet.http.HttpSessionEvent;
 import javax.servlet.http.HttpSessionListener;
@@ -52,7 +50,6 @@ public class BeginWebBeansListener implements ServletContextListener, ServletReq
      */
     private static final Logger logger = Logger.getInstance(LogCategory.OPENEJB_CDI, BeginWebBeansListener.class);
 
-    protected FailOverService failoverService;
     private final CdiAppContextsService contextsService;
 
     /**
@@ -67,7 +64,6 @@ public class BeginWebBeansListener implements ServletContextListener, ServletReq
      */
     public BeginWebBeansListener(final WebBeansContext webBeansContext) {
         this.webBeansContext = webBeansContext;
-        this.failoverService = webBeansContext != null ? this.webBeansContext.getService(FailOverService.class)
: null;
         this.contextsService = webBeansContext != null ? CdiAppContextsService.class.cast(webBeansContext.getService(ContextsService.class))
: null;
         this.contextKey = "org.apache.tomee.catalina.WebBeansListener@" + webBeansContext.hashCode();
     }
@@ -93,19 +89,6 @@ public class BeginWebBeansListener implements ServletContextListener, ServletReq
         }
 
         try {
-            if (event != null
-                    && failoverService != null
-                    && failoverService.isSupportFailOver()) {
-                Object request = event.getServletRequest();
-                if (request instanceof HttpServletRequest) {
-                    HttpServletRequest httpRequest = (HttpServletRequest) request;
-                    javax.servlet.http.HttpSession session = httpRequest.getSession(false);
-                    if (session != null) {
-                        failoverService.sessionIsIdle(session);
-                    }
-                }
-            }
-
             // clean up the EL caches after each request
             final ELContextStore elStore = ELContextStore.getInstance(false);
             if (elStore != null) {
@@ -195,9 +178,6 @@ public class BeginWebBeansListener implements ServletContextListener,
ServletReq
 
     @Override
     public void sessionDidActivate(final HttpSessionEvent event) {
-        if (failoverService.isSupportFailOver() || failoverService.isSupportPassivation())
{
-            failoverService.sessionDidActivate(event.getSession());
-        }
     }
 
     @Override


Mime
View raw message