openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r749079 - in /incubator/openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/config/ main/java/org/apache/webbeans/config/inheritance/ main/java/org/apache/webbeans/decorator/ main/java/org/apache/webbeans/intercept/ main/res...
Date Sun, 01 Mar 2009 19:33:20 GMT
Author: gerdogdu
Date: Sun Mar  1 19:33:19 2009
New Revision: 749079

URL: http://svn.apache.org/viewvc?rev=749079&view=rev
Log:
Adding @Inherited support for type level meta-data. Also, updating and adding tests for interceptors.

Added:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/AbstractBeanInheritedMetaData.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/BeanInheritedMetaData.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/IBeanInheritedMetaData.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/InheritFromMultipleParentComponent.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/InheritFromParentComponent.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/ParentComponent.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/ParentComponentSubClass.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhBinding1.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhBinding2.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhDeployment1.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhDeployment2.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhIntBinding1.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhIntBinding2.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhScopeType1.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhScopeType2.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhStereo1.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhStereo2.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/ShoppingCard.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/TransactionalInterceptor.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inheritance/
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inheritance/InheritanceTest.java   (with props)
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/webbeans/ShoppingCardInterceptorTest.java   (with props)
Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/resources/log4j.properties
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Transactional.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java?rev=749079&r1=749078&r2=749079&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java Sun Mar  1 19:33:19 2009
@@ -20,6 +20,7 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Type;
+import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -681,7 +682,33 @@
     public static <T> void defineInjectedFields(ComponentImpl<T> component)
     {
         Class<T> clazz = component.getReturnType();
+        
+        //From component
+        defineInternalInjectedFields(component, clazz, false);
+        
+        //From inherited super class
+        defineInternalInjectedFieldsRecursively(component, clazz);
 
+    }
+    
+    @SuppressWarnings("unchecked")
+    private static <T> void defineInternalInjectedFieldsRecursively(ComponentImpl<T> component, Class<T> clazz)
+    {
+        //From inheritance
+        Class<?> superClazz = clazz.getSuperclass();
+        if(!superClazz.equals(Object.class))
+        {
+            //From super class
+            defineInternalInjectedFields(component, (Class<T>)superClazz, true);
+            
+            //From super class type hierarchy
+            defineInternalInjectedFieldsRecursively(component, (Class<T>)superClazz);
+        }
+   
+    }
+    
+    private static <T> void defineInternalInjectedFields(ComponentImpl<T> component,Class<T> clazz, boolean fromSuperClazz)
+    {
         if(!WebBeansUtil.checkObservableFieldsConditions(clazz))
         {
             WebBeansUtil.checkObtainsFieldConditions(clazz);   
@@ -727,14 +754,34 @@
                     int mod = field.getModifiers();
                     if (!Modifier.isStatic(mod) && !Modifier.isFinal(mod))
                     {
-                        component.addInjectedField(field);
-                        addFieldInjectionPointMetaData(component, field);
+                        if(!fromSuperClazz)
+                        {
+                            component.addInjectedField(field);                        
+                            addFieldInjectionPointMetaData(component, field);                            
+                        }
+                        else
+                        {
+                            //Check that field is already exist
+                            Set<Field> definedInjectedFields = component.getInjectedFields();
+                            for(Field defineInjectedField : definedInjectedFields)
+                            {
+                                if(defineInjectedField.getName().equals(field.getName()) && defineInjectedField.getType().equals(field.getType()))
+                                {
+                                    break;
+                                }
+                                else
+                                {
+                                    component.addInjectedField(field);                        
+                                    addFieldInjectionPointMetaData(component, field);                                                                
+                                }
+                            }
+                        }                        
                     }
                 }
                 
             }
         }
-
+        
     }
 
     public static <T> void defineInjectedMethods(ComponentImpl<T> component)
@@ -742,6 +789,33 @@
         Asserts.assertNotNull(component, "component parameter can not be null");
 
         Class<T> clazz = component.getReturnType();
+        
+        //From component class definition
+        defineInternalInjectedMethods(component, clazz, false);
+        
+        //From inheritance hierarchy
+        defineInternalInjectedMethodsRecursively(component, clazz);
+    }
+    
+    @SuppressWarnings("unchecked")
+    private static <T> void defineInternalInjectedMethodsRecursively(ComponentImpl<T> component, Class<T> clazz)
+    {
+        //From inheritance
+        Class<?> superClazz = clazz.getSuperclass();
+        if(!superClazz.equals(Object.class))
+        {
+            //From super class
+            defineInternalInjectedMethods(component, (Class<T>)superClazz, true);
+            
+            //From super class type hierarchy
+            defineInternalInjectedMethodsRecursively(component, (Class<T>)superClazz);
+        }
+
+    }
+    
+    private static <T> void defineInternalInjectedMethods(ComponentImpl<T> component, Class<T> clazz, boolean fromInherited)
+    {
+        
         Method[] methods = clazz.getDeclaredMethods();
         for (Method method : methods)
         {
@@ -769,11 +843,33 @@
          
             if (!Modifier.isStatic(method.getModifiers()))
             {
-                component.addInjectedMethod(method);
-                addMethodInjectionPointMetaData(component, method);
+                if(!fromInherited)
+                {
+                    component.addInjectedMethod(method);
+                    addMethodInjectionPointMetaData(component, method);    
+                }
+                else
+                {
+                    Set<Method> injectedMethods = component.getInjectedMethods();
+                    for(Method definedInjectedMethod : injectedMethods)
+                    {
+                        if(definedInjectedMethod.getName().equals(method.getName()) &&
+                                Arrays.equals(definedInjectedMethod.getParameterTypes(), method.getParameterTypes()))
+                        {
+                            break;
+                        }
+                        else
+                        {
+                            component.addInjectedMethod(method);
+                            addMethodInjectionPointMetaData(component, method);                            
+                        }
+                    }
+                }
+                                
             }
 
         }
+        
     }
 
     /**
@@ -797,7 +893,7 @@
         else
         {
             throw new WebBeansConfigurationException("Initializer method : " + method.getName() + " in class : " + clazz.getName() 
-                                                     + " can not be annotated with @Produces or @Destructor");
+                                                     + " can not be annotated with @Produces");
         }
     }
 

Added: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/AbstractBeanInheritedMetaData.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/AbstractBeanInheritedMetaData.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/AbstractBeanInheritedMetaData.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/AbstractBeanInheritedMetaData.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,121 @@
+/*
+ *  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.config.inheritance;
+
+import java.lang.annotation.Annotation;
+import java.util.HashSet;
+import java.util.Set;
+
+
+import org.apache.webbeans.component.AbstractComponent;
+
+/**
+ * Defines the bean inherited meta-datas.
+ */
+abstract class AbstractBeanInheritedMetaData<T> implements IBeanInheritedMetaData
+{
+    /**Component that inherits the meta-datas*/
+    protected AbstractComponent<T> component;
+    
+    /**Inherited class*/
+    protected Class<?> inheritedClazz;
+    
+    /**Inherited binding types*/
+    protected Set<Annotation> inheritedBindingTypes = new HashSet<Annotation>();
+    
+    protected Set<Annotation> inheritedStereoTypes = new HashSet<Annotation>();
+    
+    protected Set<Annotation> inheritedInterceptorBindingTypes = new HashSet<Annotation>();
+    
+    protected Annotation inheritedScopeType = null;
+    
+    protected Annotation inheritedDeploymentType = null;
+    
+    protected AbstractBeanInheritedMetaData(AbstractComponent<T> component, Class<?> inheritedClazz)
+    {
+        this.component = component;
+        this.inheritedClazz = inheritedClazz;
+        
+        setInheritedBindingTypes();
+        setInheritedDeploymentType();
+        setInheritedInterceptorBindingTypes();
+        setInheritedScopeType();
+        setInheritedStereoTypes();
+    }     
+    
+    public Set<Annotation> getInheritedBindingTypes()
+    {
+        return this.inheritedBindingTypes;
+    }
+
+    public Set<Annotation> getInheritedStereoTypes()
+    {
+        return this.inheritedStereoTypes;
+    }
+    
+    public Set<Annotation> getInheritedInterceptorBindingTypes()
+    {
+        return this.inheritedInterceptorBindingTypes;
+    }
+    
+    public Annotation getInheritedScopeType()
+    {
+        return this.inheritedScopeType;
+    }
+    
+    public Annotation getInheritedDeploymentType()
+    {
+        return this.inheritedDeploymentType;
+    }
+    
+    protected AbstractComponent<T> getComponent()
+    {
+        return this.component;
+    }
+    
+    protected Class<?> getInheritedClazz()
+    {
+        return this.inheritedClazz;
+    }
+    
+    /**
+     * @param inheritedBindingTypes the inheritedBindingTypes to set
+     */
+    abstract protected void setInheritedBindingTypes();
+
+    /**
+     * @param inheritedStereoTypes the inheritedStereoTypes to set
+     */
+    abstract protected void setInheritedStereoTypes();
+
+    /**
+     * @param inheritedInterceptorBindingTypes the inheritedInterceptorBindingTypes to set
+     */
+    abstract protected void setInheritedInterceptorBindingTypes();
+
+    /**
+     * @param inheritedScopeType the inheritedScopeType to set
+     */
+    abstract protected void setInheritedScopeType();
+
+    /**
+     * @param inheritedDeploymentType the inheritedDeploymentType to set
+     */
+    abstract protected void setInheritedDeploymentType();
+    
+    
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/AbstractBeanInheritedMetaData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/BeanInheritedMetaData.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/BeanInheritedMetaData.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/BeanInheritedMetaData.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/BeanInheritedMetaData.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,138 @@
+/*
+ *  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.config.inheritance;
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.Inherited;
+import java.util.Set;
+
+import javax.annotation.Stereotype;
+import javax.context.ScopeType;
+import javax.inject.BindingType;
+import javax.inject.DeploymentType;
+import javax.interceptor.InterceptorBindingType;
+
+import org.apache.webbeans.component.AbstractComponent;
+import org.apache.webbeans.util.AnnotationUtil;
+
+public class BeanInheritedMetaData<T> extends AbstractBeanInheritedMetaData<T>
+{
+    public BeanInheritedMetaData(AbstractComponent<T> component)
+    {
+        super(component, component.getReturnType().getSuperclass());
+    }
+
+    
+    protected void setInheritedBindingTypes()
+    {
+        if(this.inheritedClazz != Object.class)
+        {
+            setInheritedTypes(getInheritedBindingTypes(), this.inheritedClazz, BindingType.class);
+        }        
+    }
+
+     
+    protected void setInheritedDeploymentType()
+    {
+        if(this.inheritedClazz != Object.class)
+        {
+            setInheritedType(this.inheritedClazz, DeploymentType.class);
+        }
+        
+    }
+
+    
+    protected void setInheritedInterceptorBindingTypes()
+    {
+        if(this.inheritedClazz != Object.class)
+        {
+            setInheritedTypes(getInheritedInterceptorBindingTypes(), this.inheritedClazz, InterceptorBindingType.class);
+        }        
+        
+    }
+
+    
+    protected void setInheritedScopeType()
+    {
+        if(this.inheritedClazz != Object.class)
+        {
+            setInheritedType(this.inheritedClazz, ScopeType.class);
+        }
+    }
+
+    
+    protected void setInheritedStereoTypes()
+    {
+        if(this.inheritedClazz != Object.class)
+        {
+            setInheritedTypes(getInheritedStereoTypes(), this.inheritedClazz, Stereotype.class);
+        }        
+        
+    }
+    
+    private void setInheritedType(Class<?> inheritedClass, Class<? extends Annotation> annotationType)
+    {
+        Annotation annotation = AnnotationUtil.getMetaAnnotations(inheritedClass.getAnnotations(), annotationType)[0];
+        
+        if(annotation != null && annotation.annotationType().isAnnotationPresent(Inherited.class))
+        {
+            if(annotationType.equals(ScopeType.class))
+            {
+                this.inheritedScopeType = annotation;
+            }
+            else if(annotationType.equals(DeploymentType.class))
+            {
+                this.inheritedDeploymentType = annotation;
+            }
+        }
+        else
+        {
+            if(hasSuperType(inheritedClass))
+            {
+                setInheritedType(inheritedClass.getSuperclass(), annotationType);
+            }
+        }
+        
+    }
+    
+    private void setInheritedTypes(Set<Annotation> types, Class<?> inheritedClass, Class<? extends Annotation> annotationType)
+    {
+        Annotation[] annotations = AnnotationUtil.getMetaAnnotations(inheritedClass.getAnnotations(), annotationType);
+        
+        for(Annotation annotation : annotations)
+        {
+            if(!types.contains(annotation))
+            {
+                if(AnnotationUtil.isAnnotationExistOnClass(annotation.annotationType(), Inherited.class))
+                {
+                    types.add(annotation);   
+                }
+            }
+        }
+        
+        if(hasSuperType(inheritedClass))
+        {
+            setInheritedTypes(types, inheritedClass.getSuperclass(), annotationType);    
+        }        
+    }
+    
+
+    private boolean hasSuperType(Class<?> clazz)
+    {
+        return (clazz.getSuperclass() != Object.class) ? true : false;
+    }
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/BeanInheritedMetaData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/IBeanInheritedMetaData.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/IBeanInheritedMetaData.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/IBeanInheritedMetaData.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/IBeanInheritedMetaData.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,34 @@
+/*
+ *  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.config.inheritance;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+public interface IBeanInheritedMetaData
+{
+
+    public Set<Annotation> getInheritedBindingTypes();
+
+    public Set<Annotation> getInheritedStereoTypes();
+    
+    public Set<Annotation> getInheritedInterceptorBindingTypes();
+    
+    public Annotation getInheritedScopeType();
+    
+    public Annotation getInheritedDeploymentType();    
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/inheritance/IBeanInheritedMetaData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java?rev=749079&r1=749078&r2=749079&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java Sun Mar  1 19:33:19 2009
@@ -43,10 +43,44 @@
     }
 
     public static void checkDecoratorConditions(Class<?> decoratorClazz)
-    {
-        Field[] fields = decoratorClazz.getDeclaredFields();
+    {       
         Set<Class<?>> decoratorSet = new HashSet<Class<?>>();
         ClassUtil.setInterfaceTypeHierarchy(decoratorSet, decoratorClazz);
+        
+        //No-Decorates found, check from super class
+        if(!checkInternalDecoratorConditions(decoratorClazz, decoratorSet))
+        {
+           boolean found = checkInternalDecoratorConditionsRecursivley(decoratorClazz,decoratorSet);
+           
+           if(!found)
+           {
+               throw new WebBeansConfigurationException("Decorator delegate attribute for decorator class : " + decoratorClazz.getName() + " can not be found!");
+           }
+        }
+    }
+    
+    private static boolean checkInternalDecoratorConditionsRecursivley(Class<?> decoratorClazz,Set<Class<?>> decoratorSet)
+    {
+        Class<?> superClazz = decoratorClazz.getSuperclass();
+        if(!superClazz.equals(Object.class))
+        {
+            boolean found = checkInternalDecoratorConditions(superClazz, decoratorSet);
+            if(!found)
+            {
+                return checkInternalDecoratorConditionsRecursivley(superClazz, decoratorSet);
+            }
+            else
+            {
+                return true;
+            }
+        }
+        
+        return false;
+    }
+    
+    private static boolean checkInternalDecoratorConditions(Class<?> decoratorClazz,Set<Class<?>> decoratorSet)
+    {
+        Field[] fields = decoratorClazz.getDeclaredFields();
         boolean found = false;
         for (Field field : fields)
         {
@@ -75,8 +109,10 @@
                     found = true;
                 }
             }
-
         }
+        
+        return found;
+        
     }
 
     public static void checkSimpleWebBeanDecoratorConditions(ComponentImpl<?> component)

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java?rev=749079&r1=749078&r2=749079&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java Sun Mar  1 19:33:19 2009
@@ -79,6 +79,36 @@
     protected void initDelegate()
     {
         Field field = ClassUtil.getFieldWithAnnotation(this.clazz, Decorates.class);
+        
+        if(field == null)
+        {
+            initDelegateRecursively(this.clazz);
+        }
+        else
+        {
+            initDelegateInternal(field);
+        }
+    }
+    
+    private void initDelegateRecursively(Class<?> delegateClazz)
+    {
+        Class<?> superClazz = delegateClazz.getSuperclass();
+        if(!superClazz.equals(Object.class))
+        {
+            Field field = ClassUtil.getFieldWithAnnotation(superClazz, Decorates.class);
+            if(field != null)
+            {
+                initDelegateInternal(field);
+            }
+            else
+            {
+                initDelegateRecursively(superClazz);
+            }
+        }
+    }
+    
+    private void initDelegateInternal(Field field)
+    {
         this.delegateType = field.getType();
 
         Annotation[] anns = field.getAnnotations();
@@ -90,7 +120,7 @@
                 this.delegateBindingTypes.add(ann);
             }
         }
-
+        
     }
 
     public boolean isDecoratorMatch(Set<Class<?>> apiType, Set<Annotation> annotation)

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java?rev=749079&r1=749078&r2=749079&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java Sun Mar  1 19:33:19 2009
@@ -169,19 +169,33 @@
         while (it.hasNext())
         {
             InterceptorData data = it.next();
-            if (isMethodAnnotatedWithInterceptorClass)
+            
+            if(!data.isDefinedWithWebBeansInterceptor())
             {
-                if (isMethodAnnotatedWithExcludeInterceptorClass)
+                if (isMethodAnnotatedWithInterceptorClass)
                 {
-                    if (!data.isDefinedInMethod() && data.isDefinedInInterceptorClass())
+                    if (isMethodAnnotatedWithExcludeInterceptorClass)
                     {
-                        it.remove();
+                        if (!data.isDefinedInMethod() && data.isDefinedInInterceptorClass())
+                        {
+                            it.remove();
+                        }
+                        else if (data.isDefinedInMethod())
+                        {
+                            if (!data.getAnnotatedMethod().equals(method))
+                            {
+                                it.remove();
+                            }
+                        }
                     }
-                    else if (data.isDefinedInMethod())
+                    else
                     {
-                        if (!data.getAnnotatedMethod().equals(method))
+                        if (data.isDefinedInMethod())
                         {
-                            it.remove();
+                            if (!data.getAnnotatedMethod().equals(method))
+                            {
+                                it.remove();
+                            }
                         }
                     }
                 }
@@ -189,21 +203,12 @@
                 {
                     if (data.isDefinedInMethod())
                     {
-                        if (!data.getAnnotatedMethod().equals(method))
-                        {
-                            it.remove();
-                        }
+                        it.remove();
                     }
                 }
+                
             }
-            else
-            {
-                if (data.isDefinedInMethod())
-                {
-                    it.remove();
-                }
-            }
-
+            
         }
 
     }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java?rev=749079&r1=749078&r2=749079&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java Sun Mar  1 19:33:19 2009
@@ -186,9 +186,9 @@
                 {
                     WebBeansInterceptor interceptor = (WebBeansInterceptor) it.next();
 
-                    WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), AroundInvoke.class, false, true, stack, method, true);
-                    WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), PostConstruct.class, false, true, stack, method, true);
-                    WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), PreDestroy.class, false, true, stack, method, true);
+                    WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), AroundInvoke.class, true, true, stack, method, true);
+                    WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), PostConstruct.class, true, true, stack, method, true);
+                    WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), PreDestroy.class, true, true, stack, method, true);
                 }
 
             }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/resources/log4j.properties?rev=749079&r1=749078&r2=749079&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/resources/log4j.properties (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/resources/log4j.properties Sun Mar  1 19:33:19 2009
@@ -36,4 +36,4 @@
 
 
 ### Main project logger to info
-log4j.logger.org.apache.webbeans=debug,stdout
\ No newline at end of file
+log4j.logger.org.apache.webbeans=debug
\ No newline at end of file

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/InheritFromMultipleParentComponent.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/InheritFromMultipleParentComponent.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/InheritFromMultipleParentComponent.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/InheritFromMultipleParentComponent.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,22 @@
+/*
+ *  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.test.component.inheritance;
+
+public class InheritFromMultipleParentComponent extends ParentComponentSubClass
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/InheritFromMultipleParentComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/InheritFromParentComponent.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/InheritFromParentComponent.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/InheritFromParentComponent.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/InheritFromParentComponent.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,22 @@
+/*
+ *  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.test.component.inheritance;
+
+public class InheritFromParentComponent extends ParentComponent
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/InheritFromParentComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/ParentComponent.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/ParentComponent.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/ParentComponent.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/ParentComponent.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,39 @@
+/*
+ *  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.test.component.inheritance;
+
+import org.apache.webbeans.test.component.inheritance.types.InhBinding1;
+import org.apache.webbeans.test.component.inheritance.types.InhBinding2;
+import org.apache.webbeans.test.component.inheritance.types.InhDeployment1;
+import org.apache.webbeans.test.component.inheritance.types.InhIntBinding1;
+import org.apache.webbeans.test.component.inheritance.types.InhIntBinding2;
+import org.apache.webbeans.test.component.inheritance.types.InhScopeType1;
+import org.apache.webbeans.test.component.inheritance.types.InhStereo1;
+import org.apache.webbeans.test.component.inheritance.types.InhStereo2;
+
+@InhBinding1
+@InhBinding2
+@InhDeployment1
+@InhStereo1
+@InhStereo2
+@InhScopeType1
+@InhIntBinding1
+@InhIntBinding2
+public class ParentComponent
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/ParentComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/ParentComponentSubClass.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/ParentComponentSubClass.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/ParentComponentSubClass.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/ParentComponentSubClass.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,22 @@
+/*
+ *  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.test.component.inheritance;
+
+public class ParentComponentSubClass extends ParentComponent
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/ParentComponentSubClass.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhBinding1.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhBinding1.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhBinding1.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhBinding1.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,34 @@
+/*
+ *  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.test.component.inheritance.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@BindingType
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER })
+public @interface InhBinding1 
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhBinding1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhBinding2.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhBinding2.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhBinding2.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhBinding2.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,34 @@
+/*
+ *  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.test.component.inheritance.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@BindingType
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER })
+public @interface InhBinding2 
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhBinding2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhDeployment1.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhDeployment1.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhDeployment1.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhDeployment1.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,34 @@
+/*
+ *  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.test.component.inheritance.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.DeploymentType;
+
+@DeploymentType
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER })
+public @interface InhDeployment1 
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhDeployment1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhDeployment2.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhDeployment2.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhDeployment2.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhDeployment2.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,34 @@
+/*
+ *  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.test.component.inheritance.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.DeploymentType;
+
+@DeploymentType
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER })
+public @interface InhDeployment2 
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhDeployment2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhIntBinding1.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhIntBinding1.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhIntBinding1.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhIntBinding1.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,34 @@
+/*
+ *  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.test.component.inheritance.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBindingType;
+
+@InterceptorBindingType
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER })
+public @interface InhIntBinding1 
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhIntBinding1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhIntBinding2.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhIntBinding2.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhIntBinding2.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhIntBinding2.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,34 @@
+/*
+ *  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.test.component.inheritance.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBindingType;
+
+@InterceptorBindingType
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER })
+public @interface InhIntBinding2 
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhIntBinding2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhScopeType1.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhScopeType1.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhScopeType1.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhScopeType1.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,34 @@
+/*
+ *  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.test.component.inheritance.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.context.ScopeType;
+
+@ScopeType
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER })
+public @interface InhScopeType1 
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhScopeType1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhScopeType2.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhScopeType2.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhScopeType2.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhScopeType2.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,34 @@
+/*
+ *  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.test.component.inheritance.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.context.ScopeType;
+
+@ScopeType
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER })
+public @interface InhScopeType2 
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhScopeType2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhStereo1.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhStereo1.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhStereo1.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhStereo1.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,34 @@
+/*
+ *  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.test.component.inheritance.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.annotation.Stereotype;
+
+@Stereotype
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER })
+public @interface InhStereo1 
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhStereo1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhStereo2.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhStereo2.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhStereo2.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhStereo2.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,34 @@
+/*
+ *  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.test.component.inheritance.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.annotation.Stereotype;
+
+@Stereotype
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER })
+public @interface InhStereo2 
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/inheritance/types/InhStereo2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/ShoppingCard.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/ShoppingCard.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/ShoppingCard.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/ShoppingCard.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,36 @@
+/*
+ * 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.test.component.intercept.webbeans;
+
+import javax.context.SessionScoped;
+
+import org.apache.webbeans.test.component.intercept.webbeans.bindings.Transactional;
+
+@SessionScoped
+public class ShoppingCard
+{
+    public static boolean CALLED = false;
+    
+    @Transactional
+    public void placeOrder() 
+    { 
+        
+    }
+    
+    public void placeOrder2() 
+    { 
+        CALLED = false;
+    }
+    
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/ShoppingCard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/TransactionalInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/TransactionalInterceptor.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/TransactionalInterceptor.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/TransactionalInterceptor.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,45 @@
+/*
+ *  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.test.component.intercept.webbeans;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+import org.apache.webbeans.test.component.intercept.webbeans.bindings.Transactional;
+
+@Interceptor
+@Transactional
+public class TransactionalInterceptor
+{
+
+    @AroundInvoke
+    public Object caller(InvocationContext context) throws Exception
+    {
+        try
+        {
+            ShoppingCard.CALLED = true;
+            return context.proceed();
+            
+        }catch(Exception e)
+        {
+            ShoppingCard.CALLED = false;
+        }
+        
+        return null;
+    }
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/TransactionalInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Transactional.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Transactional.java?rev=749079&r1=749078&r2=749079&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Transactional.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Transactional.java Sun Mar  1 19:33:19 2009
@@ -23,6 +23,7 @@
 @InterceptorBindingType
 @Retention(RetentionPolicy.RUNTIME)
 @Target( { ElementType.TYPE, ElementType.METHOD })
-public @interface Transactional {
+public @interface Transactional 
+{
 
 }

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inheritance/InheritanceTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inheritance/InheritanceTest.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inheritance/InheritanceTest.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inheritance/InheritanceTest.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,73 @@
+/*
+ *  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.test.unittests.inheritance;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+import junit.framework.Assert;
+
+import org.apache.webbeans.component.AbstractComponent;
+import org.apache.webbeans.config.inheritance.BeanInheritedMetaData;
+import org.apache.webbeans.test.component.inheritance.InheritFromParentComponent;
+import org.apache.webbeans.test.component.inheritance.types.InhDeployment1;
+import org.apache.webbeans.test.component.inheritance.types.InhStereo1;
+import org.apache.webbeans.test.component.inheritance.types.InhStereo2;
+import org.apache.webbeans.test.servlet.TestContext;
+import org.junit.Before;
+import org.junit.Test;
+
+public class InheritanceTest extends TestContext
+{
+    
+    public InheritanceTest()
+    {
+        super(InheritanceTest.class.getName());
+    }
+
+    @Before
+    public void init()
+    {
+        initDefaultDeploymentTypes();
+        initializeDeploymentType(InhDeployment1.class,2);
+        initializeStereoType(InhStereo1.class);
+        initializeStereoType(InhStereo2.class);
+    }
+    
+    @Test
+    public void testInheritedComponentMetaData()
+    {
+        AbstractComponent<InheritFromParentComponent> component = defineSimpleWebBean(InheritFromParentComponent.class);
+        
+        BeanInheritedMetaData<InheritFromParentComponent> data = new BeanInheritedMetaData<InheritFromParentComponent>(component);
+        
+        Set<Annotation> btypes = data.getInheritedBindingTypes();
+        Assert.assertEquals(2, btypes.size());
+        
+        Annotation annot = data.getInheritedDeploymentType();
+        Assert.assertNotNull(annot);
+        
+        btypes = data.getInheritedInterceptorBindingTypes();
+        Assert.assertEquals(2, btypes.size());
+        
+        annot = data.getInheritedScopeType();
+        Assert.assertNotNull(annot);
+        
+        btypes = data.getInheritedStereoTypes();
+        Assert.assertEquals(2, btypes.size());
+    }
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/inheritance/InheritanceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/webbeans/ShoppingCardInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/webbeans/ShoppingCardInterceptorTest.java?rev=749079&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/webbeans/ShoppingCardInterceptorTest.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/webbeans/ShoppingCardInterceptorTest.java Sun Mar  1 19:33:19 2009
@@ -0,0 +1,65 @@
+/*
+ *  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.test.unittests.intercept.webbeans;
+
+import javax.inject.manager.Bean;
+
+import junit.framework.Assert;
+
+import org.apache.webbeans.context.ContextFactory;
+import org.apache.webbeans.test.component.intercept.webbeans.ShoppingCard;
+import org.apache.webbeans.test.component.intercept.webbeans.TransactionalInterceptor;
+import org.apache.webbeans.test.mock.MockHttpSession;
+import org.apache.webbeans.test.servlet.TestContext;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ShoppingCardInterceptorTest extends TestContext
+{
+    public ShoppingCardInterceptorTest()
+    {
+        super(ShoppingCardInterceptorTest.class.getName());
+    }
+    
+    @Before
+    public void init()
+    {
+        initDefaultDeploymentTypes();
+        initDefaultStereoTypes();
+        initializeInterceptorType(TransactionalInterceptor.class);
+    }
+
+    @Test
+    public void testTransactionalInterceptor()
+    {
+        ContextFactory.initSessionContext(new MockHttpSession());
+        defineSimpleWebBeanInterceptor(TransactionalInterceptor.class);
+        
+        Bean<ShoppingCard> bean = defineSimpleWebBean(ShoppingCard.class);
+        ShoppingCard card = getManager().getInstance(bean);
+        
+        card.placeOrder();
+        
+        Assert.assertTrue(ShoppingCard.CALLED);
+        
+        card.placeOrder2();
+        
+        Assert.assertFalse(ShoppingCard.CALLED);
+                
+        ContextFactory.destroySessionContext(new MockHttpSession());
+    }
+}

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/intercept/webbeans/ShoppingCardInterceptorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java?rev=749079&r1=749078&r2=749079&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/xml/definition/XMLDefinitionTest.java Sun Mar  1 19:33:19 2009
@@ -18,6 +18,7 @@
 import org.apache.webbeans.component.AbstractComponent;
 import org.apache.webbeans.component.xml.XMLComponentImpl;
 import org.apache.webbeans.context.ContextFactory;
+import org.apache.webbeans.test.annotation.binding.Mock;
 import org.apache.webbeans.test.servlet.TestContext;
 import org.apache.webbeans.test.xml.definition.Definition1;
 import org.apache.webbeans.test.xml.definition.Definition2;
@@ -40,6 +41,7 @@
     public void init()
     {
         initDefaultDeploymentTypes();
+        initializeDeploymentType(Mock.class, 2);
         initDependentContext();
     }
 



Mime
View raw message