openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r984866 - in /openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans: servlet/WebBeansConfigurationListener.java web/failover/FailOverBagWrapper.java
Date Thu, 12 Aug 2010 17:07:17 GMT
Author: struberg
Date: Thu Aug 12 17:07:16 2010
New Revision: 984866

URL: http://svn.apache.org/viewvc?rev=984866&view=rev
Log:
OWB-385 move servlet listener part to the already used WebBeansConfiguationListener

Modified:
    openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java
    openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/FailOverBagWrapper.java

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java?rev=984866&r1=984865&r2=984866&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java
Thu Aug 12 17:07:16 2010
@@ -216,20 +216,26 @@ public class WebBeansConfigurationListen
         conversationManager.destroyConversationContextWithSessionId(event.getSession().getId());
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void sessionDidActivate(HttpSessionEvent event)
+    public void sessionWillPassivate(HttpSessionEvent event) 
     {
+        if (failoverService != null &&
+            failoverService.isSupportPassivation())
+        {
+            HttpSession session = event.getSession();
+            failoverService.sessionWillPassivate(session);
+        }
+
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
-    public void sessionWillPassivate(HttpSessionEvent event)
+    public void sessionDidActivate(HttpSessionEvent event)
     {
+        if (failoverService.isSupportFailOver() ||
+            failoverService.isSupportPassivation())
+        {
+            HttpSession session = event.getSession();
+            failoverService.restoreBeans(session);
+        }
     }
-
 }

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/FailOverBagWrapper.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/FailOverBagWrapper.java?rev=984866&r1=984865&r2=984866&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/FailOverBagWrapper.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/FailOverBagWrapper.java
Thu Aug 12 17:07:16 2010
@@ -31,8 +31,6 @@ import java.io.ObjectOutput;
 import java.io.ObjectOutputStream;
 
 import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpSessionActivationListener;
-import javax.servlet.http.HttpSessionEvent;
 
 import org.apache.webbeans.corespi.ServiceLoader;
 import org.apache.webbeans.logger.WebBeansLogger;
@@ -45,8 +43,7 @@ import javassist.util.proxy.ProxyObjectO
  * Use javassist Proxy streams to serialize and restore failover bean bag.
  * 
  */
-public class FailOverBagWrapper implements HttpSessionActivationListener, 
-        Serializable, Externalizable 
+public class FailOverBagWrapper implements Serializable, Externalizable 
 {
     /**Logger instance*/
     private static final WebBeansLogger logger = 
@@ -185,26 +182,4 @@ public class FailOverBagWrapper implemen
         }
     }
 
-    @Override
-    public void sessionWillPassivate(HttpSessionEvent event) 
-    {
-        if (failoverService != null && 
-            failoverService.isSupportPassivation()) 
-        {
-            HttpSession session = event.getSession();
-            failoverService.sessionWillPassivate(session);
-        }
-        
-    }
-
-    @Override
-    public void sessionDidActivate(HttpSessionEvent event) 
-    {
-        if (failoverService.isSupportFailOver() || 
-            failoverService.isSupportPassivation()) 
-        {
-            HttpSession session = event.getSession();
-            failoverService.restoreBeans(session);
-        }
-    }
 }



Mime
View raw message