openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r911764 - in /openwebbeans/trunk: webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/DefaultLifecycle.java webbeans-spi/src/main/java/org/apache/webbeans/spi/ServletContainerLifecycle.java
Date Fri, 19 Feb 2010 09:52:54 GMT
Author: struberg
Date: Fri Feb 19 09:52:54 2010
New Revision: 911764

URL: http://svn.apache.org/viewvc?rev=911764&view=rev
Log:
OWB-290 rollback since there is a better way by using OpenWebBeansTestLifeCycle in tests


Removed:
    openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/ServletContainerLifecycle.java
Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/DefaultLifecycle.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/DefaultLifecycle.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/DefaultLifecycle.java?rev=911764&r1=911763&r2=911764&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/DefaultLifecycle.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/DefaultLifecycle.java
Fri Feb 19 09:52:54 2010
@@ -1,15 +1,20 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
- * or agreed to in writing, software distributed under the License is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.webbeans.lifecycle;
 
@@ -44,10 +49,10 @@
 import org.apache.webbeans.portable.events.ExtensionLoader;
 import org.apache.webbeans.portable.events.discovery.BeforeShutdownImpl;
 import org.apache.webbeans.servlet.WebBeansConfigurationListener;
+import org.apache.webbeans.spi.ContainerLifecycle;
 import org.apache.webbeans.spi.JNDIService;
 import org.apache.webbeans.spi.ScannerService;
 import org.apache.webbeans.spi.ServiceLoader;
-import org.apache.webbeans.spi.ServletContainerLifecycle;
 import org.apache.webbeans.xml.WebBeansXMLConfigurator;
 
 /**
@@ -61,7 +66,7 @@
  * @version $Rev$ $Date$
  * @see WebBeansConfigurationListener
  */
-public final class DefaultLifecycle implements ServletContainerLifecycle
+public final class DefaultLifecycle implements ContainerLifecycle
 {
 	//Logger instance
     private static final WebBeansLogger logger = WebBeansLogger.getLogger(DefaultLifecycle.class);
@@ -105,14 +110,8 @@
         rootManager.setXMLConfigurator(this.xmlDeployer);        
     }
     
-    public void requestStarted(Object startObject)
+    public void requestStarted(ServletRequestEvent event)
     {
-        ServletRequestEvent event = null;
-        if (startObject instanceof ServletRequestEvent)
-        {
-            event = (ServletRequestEvent) startObject;
-        }
-        
         logger.debug("Starting a new request : ", new Object[]{event.getServletRequest().getRemoteAddr()});
         
         ContextFactory.initializeThreadLocals();
@@ -140,37 +139,20 @@
         }
     }
 
-    public void requestEnded(Object endObject)
+    public void requestEnded(ServletRequestEvent event)
     {
-        ServletRequestEvent event = null;
-        if (endObject instanceof ServletRequestEvent)
-        {
-            event = (ServletRequestEvent) endObject;
-        }
-
     	logger.debug("Destroying a request : ", new Object[]{event.getServletRequest().getRemoteAddr()});
         ContextFactory.destroyRequestContext((HttpServletRequest) event.getServletRequest());
     }
 
-    public void sessionStarted(Object startObject)
+    public void sessionStarted(HttpSessionEvent event)
     {
-        HttpSessionEvent event = null;
-        if (startObject instanceof HttpSessionEvent)
-        {
-            event = (HttpSessionEvent) startObject;
-        }
-
         logger.debug("Starting a session with session id : ", new Object[]{event.getSession().getId()});
         ContextFactory.initSessionContext(event.getSession());
     }
 
-    public void sessionEnded(Object endObject)
+    public void sessionEnded(HttpSessionEvent event)
     {
-        HttpSessionEvent event = null;
-        if (endObject instanceof HttpSessionEvent)
-        {
-            event = (HttpSessionEvent) endObject;
-        }
     	logger.debug("Destroying a session with session id : ", new Object[]{event.getSession().getId()});
         ContextFactory.destroySessionContext(event.getSession());
 



Mime
View raw message