openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1363131 - in /openwebbeans/trunk: webbeans-impl/src/main/java/org/apache/webbeans/component/ webbeans-impl/src/main/java/org/apache/webbeans/config/ webbeans-impl/src/main/java/org/apache/webbeans/inject/impl/ webbeans-impl/src/main/java/o...
Date Wed, 18 Jul 2012 21:39:40 GMT
Author: struberg
Date: Wed Jul 18 21:39:39 2012
New Revision: 1363131

URL: http://svn.apache.org/viewvc?rev=1363131&view=rev
Log:
OWB-683 get rid of unused old methods

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/impl/InjectionPointFactory.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
    openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
    openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java
    openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java
    openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
Wed Jul 18 21:39:39 2012
@@ -572,15 +572,6 @@ public abstract class AbstractInjectionT
     /**
      * {@inheritDoc}
      */
-    @Override
-    public Set<InjectionPoint> getInjectionPoints()
-    {
-        return super.getInjectionPoints();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
     public AnnotatedType<T> getAnnotatedType()
     {
         return annotatedType;

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
Wed Jul 18 21:39:39 2012
@@ -19,11 +19,9 @@
 package org.apache.webbeans.component;
 
 import java.io.Serializable;
-import java.util.Set;
 
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.InjectionPoint;
 
 import org.apache.webbeans.util.ClassUtil;
 import org.apache.webbeans.util.WebBeansUtil;
@@ -145,26 +143,7 @@ public abstract class AbstractProducerBe
         return parentInstance;
 
     }
-    
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void destroyInstance(T instance, CreationalContext<T> creationalContext)
-    {
-
-    }
 
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Set<InjectionPoint> getInjectionPoints()
-    {
-        return super.getInjectionPoints();
-    }
-    
     protected boolean isPassivationCapable(Class<?> returnType, Integer modifiers)
     {
         if(ClassUtil.isFinal(modifiers) && !(Serializable.class.isAssignableFrom(returnType)))

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java
Wed Jul 18 21:39:39 2012
@@ -140,12 +140,6 @@ public abstract class BuildInOwbBean<T> 
         return true;
     }
 
-    protected BuildInOwbBean(WebBeansType webBeanType)
-    {
-        this(webBeanType, null);
-        initBuildInBeanConfig(getWebBeansContext());
-    }
-
     @SuppressWarnings("unchecked")
     protected BuildInOwbBean(WebBeansType webBeansType, Class<T> returnType)
     {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
Wed Jul 18 21:39:39 2012
@@ -19,20 +19,14 @@
 package org.apache.webbeans.component;
 
 import java.util.Stack;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.spi.InjectionPoint;
 import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.annotation.DependentScopeLiteral;
 import org.apache.webbeans.config.WebBeansContext;
-import org.apache.webbeans.logger.WebBeansLoggerFacade;
-
 
 public class InjectionPointBean extends AbstractOwbBean<InjectionPoint>
 {
-    private static final Logger logger = WebBeansLoggerFacade.getLogger(InjectionPointBean.class);
-    
     private static ThreadLocal<Stack<InjectionPoint>> localThreadlocalStack =
new ThreadLocal<Stack<InjectionPoint>>();
 
     private static Stack<InjectionPoint> getStackOfInjectionPoints()
@@ -50,15 +44,13 @@ public class InjectionPointBean extends 
         Stack<InjectionPoint> stackIP = getStackOfInjectionPoints();
         stackIP.push(ip);
         localThreadlocalStack.set(stackIP);
-        logger.log(Level.FINE, "PUSHED IP on stack {0}", stackIP);
         return true;
     }
     
     public static void unsetThreadLocal()
     {
         Stack<InjectionPoint> stackIP = getStackOfInjectionPoints();
-        InjectionPoint ip = stackIP.pop();
-        logger.log(Level.FINE, "POPPED IP on stack {0}", ip);
+        stackIP.pop();
     }
     
     /**
@@ -66,7 +58,6 @@ public class InjectionPointBean extends 
      */
     public static void removeThreadLocal()
     {
-        logger.fine(" local.remove() ");
         getStackOfInjectionPoints().clear();
         localThreadlocalStack.remove();
     }
@@ -89,9 +80,7 @@ public class InjectionPointBean extends 
     @Override
     protected InjectionPoint createInstance(CreationalContext<InjectionPoint> creationalContext)
     {
-        logger.log(Level.FINE, "ENTRY createInstance {0}", creationalContext);
         InjectionPoint ip = getStackOfInjectionPoints().peek();
-        logger.log(Level.FINE, "RETURN {0}", ip);
         return ip;
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
Wed Jul 18 21:39:39 2012
@@ -176,12 +176,4 @@ public class ProducerFieldBean<T> extend
         }
         return passivatingId;
     }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String toString()
-    {
-        return super.toString();
-    }
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
Wed Jul 18 21:39:39 2012
@@ -232,8 +232,6 @@ public class ProducerMethodBean<T> exten
                     }
                 }
             }
-            
-
         }
         finally
         {
@@ -358,17 +356,10 @@ public class ProducerMethodBean<T> exten
                 getScope().getName());
 
     }
-    
-    
-    
+
     @Override
     public boolean isPassivationCapable()
     {
         return isPassivationCapable(creatorMethod.getReturnType(), creatorMethod.getModifiers());
     }
-
-    public String toString()
-    {
-        return super.toString();
-    }
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
Wed Jul 18 21:39:39 2012
@@ -319,7 +319,7 @@ public final class DefinitionUtil
      * @param component configuring web beans component
      * @param annotations annotations
      */
-    public static <T> void defineScopeType(AbstractOwbBean<T> component, Annotation[]
annotations,
+    public <T> void defineScopeType(AbstractOwbBean<T> component, Annotation[]
annotations,
                                            String exceptionMessage, boolean allowLazyInit)
     {
         boolean found = false;
@@ -393,7 +393,7 @@ public final class DefinitionUtil
         }
     }
 
-    public static <T> void defineStereoTypes(OwbBean<?> component, Annotation[]
anns)
+    public <T> void defineStereoTypes(OwbBean<?> component, Annotation[] anns)
     {
         final AnnotationManager annotationManager = component.getWebBeansContext().getAnnotationManager();
         if (annotationManager.hasStereoTypeMetaAnnotation(anns))
@@ -439,7 +439,7 @@ public final class DefinitionUtil
         
     }
 
-    public static void defineDefaultScopeType(OwbBean<?> component, String exceptionMessage,
boolean allowLazyInit)
+    public void defineDefaultScopeType(OwbBean<?> component, String exceptionMessage,
boolean allowLazyInit)
     {
         // Frist look for inherited scope
         IBeanInheritedMetaData metaData = null;
@@ -813,8 +813,8 @@ public final class DefinitionUtil
 
         webBeansContext.getWebBeansUtil().setBeanEnableFlagForProducerBean(parent, component,
fieldAnns);
 
-        DefinitionUtil.defineProducerMethodApiTypes(component, field.getGenericType(), fieldAnns);
-        DefinitionUtil.defineScopeType(component, fieldAnns, "WebBeans producer method :
" + field.getName() + " in class " + parent.getReturnType().getName()
+        defineProducerMethodApiTypes(component, field.getGenericType(), fieldAnns);
+        defineScopeType(component, fieldAnns, "WebBeans producer method : " + field.getName()
+ " in class " + parent.getReturnType().getName()
                                                              + " must declare default @Scope
annotation", false);
         webBeansContext.getWebBeansUtil().checkUnproxiableApiType(component, component.getScope());
         WebBeansUtil.checkProducerGenericType(component,field);
@@ -1356,8 +1356,8 @@ public final class DefinitionUtil
         defineSerializable(bean);
         defineStereoTypes(bean, anns);
 
-        DefinitionUtil.defineProducerMethodApiTypes(bean, method.getBaseType(), anns);
-        DefinitionUtil.defineScopeType(bean, anns, "Bean producer method : " + method.getJavaMember().getName()
+ " in class "
+        defineProducerMethodApiTypes(bean, method.getBaseType(), anns);
+        defineScopeType(bean, anns, "Bean producer method : " + method.getJavaMember().getName()
+ " in class "
                                                    + parent.getReturnType().getName() + "
must declare default @Scope annotation", false);
         WebBeansUtil.checkProducerGenericType(bean,method.getJavaMember());        
         defineQualifiers(bean, anns);

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/impl/InjectionPointFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/impl/InjectionPointFactory.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/impl/InjectionPointFactory.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/impl/InjectionPointFactory.java
Wed Jul 18 21:39:39 2012
@@ -63,18 +63,10 @@ public class InjectionPointFactory
         Annotation[] annots = null;
         annots = member.getAnnotations();
 
-        if(!checkFieldApplicable(annots))
-        {
-            AnnotatedElementFactory annotatedElementFactory = webBeansContext.getAnnotatedElementFactory();
-
-            AnnotatedType<?> annotated = annotatedElementFactory.newAnnotatedType(member.getDeclaringClass());
-            return getGenericInjectionPoint(owner, annots, member.getGenericType(), member,
annotatedElementFactory.newAnnotatedField(member, annotated));
-        }
-        else
-        {
-            return null;
-        }
+        AnnotatedElementFactory annotatedElementFactory = webBeansContext.getAnnotatedElementFactory();
 
+        AnnotatedType<?> annotated = annotatedElementFactory.newAnnotatedType(member.getDeclaringClass());
+        return getGenericInjectionPoint(owner, annots, member.getGenericType(), member, annotatedElementFactory.newAnnotatedField(member,
annotated));
     }
 
     public <X> InjectionPoint getFieldInjectionPointData(Bean<?> owner, AnnotatedField<X>
annotField)
@@ -85,25 +77,7 @@ public class InjectionPointFactory
 
         Annotation[] annots = AnnotationUtil.getAnnotationsFromSet(annotField.getAnnotations());
 
-        if(!checkFieldApplicable(annots))
-        {
-            return getGenericInjectionPoint(owner, annots, annotField.getBaseType(), member,
annotField);
-        }
-        else
-        {
-            return null;
-        }
-
-    }
-
-    private static boolean checkFieldApplicable(Annotation[] anns)
-    {
-//        if(AnnotationUtil.isAnnotationExist(anns, Fires.class) || AnnotationUtil.isAnnotationExist(anns,
Obtains.class))
-//        {
-//            return true;
-//        }
-
-        return false;
+        return getGenericInjectionPoint(owner, annots, annotField.getBaseType(), member,
annotField);
     }
 
     /**

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java
Wed Jul 18 21:39:39 2012
@@ -41,13 +41,7 @@ public class StandaloneLifeCycle extends
     {
         this(null, WebBeansLoggerFacade.getLogger(StandaloneLifeCycle.class));
     }
-    
-    @Override
-    public void beforeInitApplication(Properties properties)
-    {
-//        WebBeansFinder.clearInstances(WebBeansUtil.getCurrentClassLoader());
-    }
-    
+
     @Override
     public void beforeStartApplication(Object object)
     {
@@ -57,8 +51,7 @@ public class StandaloneLifeCycle extends
         webBeansContext.getContextFactory().initApplicationContext(null);
         webBeansContext.getContextFactory().initSingletonContext(null);
     }
-        
-    
+
     @Override
     public void beforeStopApplication(Object endObject)
     {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
Wed Jul 18 21:39:39 2012
@@ -517,7 +517,7 @@ public final class WebBeansAnnotatedType
 
                 Set<Type> types = annotatedMethod.getTypeClosure();
                 producerMethodBean.getTypes().addAll(types);
-                DefinitionUtil.defineScopeType(producerMethodBean,
+                definitionUtil.defineScopeType(producerMethodBean,
                                                AnnotationUtil.getAnnotationsFromSet(annotatedMethod.getAnnotations()),
                                                                                     "Annotated
producer method : " + annotatedMethod +  "must declare default @Scope annotation",
                                                                                     false);

Modified: openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
(original)
+++ openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
Wed Jul 18 21:39:39 2012
@@ -110,13 +110,6 @@ public class StandaloneContainersImpl im
                 {
                     this.scannerService = discovery;
                 }
-
-                @Override
-                public void beforeStartApplication(Object object)
-                {
-                    super.beforeStartApplication(object);
-                }
-
             };
 
             Iterator<Class<?>> it = classes.iterator();

Modified: openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java
(original)
+++ openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java
Wed Jul 18 21:39:39 2012
@@ -215,16 +215,6 @@ public class ContextLifecycleListener im
         }
     }
 
-    private void serviceRemoved(Service service)
-    {
-        Container container = service.getContainer();
-        if (container instanceof StandardEngine)
-        {
-            StandardEngine engine = (StandardEngine) container;
-            engineRemoved(engine);
-        }
-    }
-
     private void engineAdded(StandardEngine engine)
     {
         addContextListener(engine);
@@ -238,17 +228,6 @@ public class ContextLifecycleListener im
         }
     }
 
-    private void engineRemoved(StandardEngine engine)
-    {
-        for (Container child : engine.findChildren())
-        {
-            if (child instanceof StandardHost)
-            {
-                StandardHost host = (StandardHost) child;
-                hostRemoved(host);
-            }
-        }
-    }
 
     private void hostAdded(StandardHost host)
     {
@@ -264,17 +243,6 @@ public class ContextLifecycleListener im
         }
     }
 
-    private void hostRemoved(StandardHost host)
-    {
-        for (Container child : host.findChildren())
-        {
-            if (child instanceof StandardContext)
-            {
-                StandardContext context = (StandardContext) child;
-                contextRemoved(context);
-            }
-        }
-    }
 
     private void contextAdded(StandardContext context)
     {
@@ -313,10 +281,6 @@ public class ContextLifecycleListener im
         }
     }
 
-    private void contextRemoved(StandardContext context)
-    {
-        
-    }
 
     public void propertyChange(PropertyChangeEvent event)
     {
@@ -328,10 +292,6 @@ public class ContextLifecycleListener im
             {
                 serviceAdded((Service) newValue);
             }
-            if (oldValue instanceof Service && newValue == null)
-            {
-                serviceRemoved((Service) oldValue);
-            }
         }
         if ("children".equals(event.getPropertyName()))
         {
@@ -344,10 +304,6 @@ public class ContextLifecycleListener im
                 {
                     hostAdded((StandardHost) newValue);
                 }
-                if (oldValue instanceof StandardHost && newValue == null)
-                {
-                    hostRemoved((StandardHost) oldValue);
-                }
             }
             if (source instanceof StandardHost)
             {
@@ -355,10 +311,6 @@ public class ContextLifecycleListener im
                 {
                     contextAdded((StandardContext) newValue);
                 }
-                if (oldValue instanceof StandardContext && newValue == null)
-                {
-                    contextRemoved((StandardContext) oldValue);
-                }
             }
         }
     }

Modified: openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java
(original)
+++ openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java
Wed Jul 18 21:39:39 2012
@@ -129,7 +129,7 @@ public class ContextLifecycleListener im
 
     public void containerEvent(ContainerEvent event)
     {
-        StandardContext context = null;
+        StandardContext context;
         
         try
         {
@@ -228,16 +228,6 @@ public class ContextLifecycleListener im
         }
     }
 
-    private void serviceRemoved(Service service)
-    {
-        Container container = service.getContainer();
-        if (container instanceof StandardEngine)
-        {
-            StandardEngine engine = (StandardEngine) container;
-            engineRemoved(engine);
-        }
-    }
-
     private void engineAdded(StandardEngine engine)
     {
         addContextListener(engine);
@@ -251,18 +241,6 @@ public class ContextLifecycleListener im
         }
     }
 
-    private void engineRemoved(StandardEngine engine)
-    {
-        for (Container child : engine.findChildren())
-        {
-            if (child instanceof StandardHost)
-            {
-                StandardHost host = (StandardHost) child;
-                hostRemoved(host);
-            }
-        }
-    }
-
     private void hostAdded(StandardHost host)
     {
         addContextListener(host);
@@ -277,18 +255,6 @@ public class ContextLifecycleListener im
         }
     }
 
-    private void hostRemoved(StandardHost host)
-    {
-        for (Container child : host.findChildren())
-        {
-            if (child instanceof StandardContext)
-            {
-                StandardContext context = (StandardContext) child;
-                contextRemoved(context);
-            }
-        }
-    }
-
     private void contextAdded(StandardContext context)
     {
         // put this class as the first listener so we can process the
@@ -326,11 +292,6 @@ public class ContextLifecycleListener im
         }
     }
 
-    private void contextRemoved(StandardContext context)
-    {
-        
-    }
-
     public void propertyChange(PropertyChangeEvent event)
     {
         if ("service".equals(event.getPropertyName()))
@@ -341,10 +302,6 @@ public class ContextLifecycleListener im
             {
                 serviceAdded((Service) newValue);
             }
-            if (oldValue instanceof Service && newValue == null)
-            {
-                serviceRemoved((Service) oldValue);
-            }
         }
         if ("children".equals(event.getPropertyName()))
         {
@@ -357,10 +314,6 @@ public class ContextLifecycleListener im
                 {
                     hostAdded((StandardHost) newValue);
                 }
-                if (oldValue instanceof StandardHost && newValue == null)
-                {
-                    hostRemoved((StandardHost) oldValue);
-                }
             }
             if (source instanceof StandardHost)
             {
@@ -368,10 +321,6 @@ public class ContextLifecycleListener im
                 {
                     contextAdded((StandardContext) newValue);
                 }
-                if (oldValue instanceof StandardContext && newValue == null)
-                {
-                    contextRemoved((StandardContext) oldValue);
-                }
             }
         }
     }

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java?rev=1363131&r1=1363130&r2=1363131&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
Wed Jul 18 21:39:39 2012
@@ -820,9 +820,4 @@ public class WebContextsService extends 
         }
     }
 
-    @Override
-    public void deActivateContext(Class<? extends Annotation> scopeType)
-    {
-        super.deActivateContext(scopeType);
-    }
 }



Mime
View raw message