openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r823718 - in /incubator/openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/annotation/ main/java/org/apache/webbeans/component/ main/java/org/apache/webbeans/config/ main/java/org/apache/webbeans/container/ main/java/org/ap...
Date Fri, 09 Oct 2009 22:21:49 GMT
Author: gerdogdu
Date: Fri Oct  9 22:21:47 2009
New Revision: 823718

URL: http://svn.apache.org/viewvc?rev=823718&view=rev
Log:
update for Named. Also update for class name change for DefaultLiteral.

Added:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DefaultLiteral.java
      - copied, changed from r823677, incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/CurrentLiteral.java
Removed:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/CurrentLiteral.java
Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
    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/container/InjectionResolver.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/BeanObserverImpl.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/InvocationContextImpl.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/CheckWithCheckPaymentDecoratorField.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/AccountComponent.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/ServiceDecorator.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/service/ServiceImpl1.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/portable/events/ExtensionTest.java

Copied: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DefaultLiteral.java
(from r823677, incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/CurrentLiteral.java)
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DefaultLiteral.java?p2=incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DefaultLiteral.java&p1=incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/CurrentLiteral.java&r1=823677&r2=823718&rev=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/CurrentLiteral.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DefaultLiteral.java
Fri Oct  9 22:21:47 2009
@@ -22,7 +22,7 @@
  * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
  * @since 1.0
  */
-public class CurrentLiteral extends AnnotationLiteral<Default> implements Default
+public class DefaultLiteral extends AnnotationLiteral<Default> implements Default
 {
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
Fri Oct  9 22:21:47 2009
@@ -19,7 +19,7 @@
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.spi.InjectionPoint;
 
-import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.annotation.DependentScopeLiteral;
 import org.apache.webbeans.annotation.StandardLiteral;
 
@@ -33,7 +33,7 @@
         super(WebBeansType.INJECTIONPOINT,InjectionPoint.class);
         this.injectionPoint = injectionPoint;
         
-        addQualifier(new CurrentLiteral());
+        addQualifier(new DefaultLiteral());
         setImplScopeType(new DependentScopeLiteral());
         setType(new StandardLiteral());
         addApiType(InjectionPoint.class);

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=823718&r1=823717&r2=823718&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
Fri Oct  9 22:21:47 2009
@@ -44,7 +44,7 @@
 import javax.inject.Inject;
 
 import org.apache.webbeans.annotation.AnyLiteral;
-import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.annotation.DependentScopeLiteral;
 import org.apache.webbeans.annotation.ProductionLiteral;
 import org.apache.webbeans.component.AbstractBean;
@@ -256,9 +256,17 @@
         
 
         // No-binding annotation
-        if (component.getQualifiers().size() == 0)
+        if (component.getQualifiers().size() == 0 )
         {
-            component.addQualifier(new CurrentLiteral());
+            component.addQualifier(new DefaultLiteral());
+        }
+        else if(component.getQualifiers().size() == 1)
+        {
+            Annotation annot = component.getQualifiers().iterator().next();
+            if(annot.annotationType().equals(Named.class))
+            {
+                component.addQualifier(new DefaultLiteral());
+            }
         }
         
         //Add @Any support

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
Fri Oct  9 22:21:47 2009
@@ -24,7 +24,7 @@
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.InjectionPoint;
 
-import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.component.AbstractBean;
 import org.apache.webbeans.config.WebBeansFinder;
 import org.apache.webbeans.container.activity.ActivityManager;
@@ -289,7 +289,7 @@
         if (qualifier.length == 0)
         {
             qualifier = new Annotation[1];
-            qualifier[0] = new CurrentLiteral();
+            qualifier[0] = new DefaultLiteral();
             currentQualifier = true;
         }
         

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
Fri Oct  9 22:21:47 2009
@@ -21,7 +21,7 @@
 import javax.enterprise.context.Conversation;
 import javax.enterprise.inject.spi.Bean;
 
-import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.config.WebBeansFinder;
 import org.apache.webbeans.container.BeanManagerImpl;
 import org.apache.webbeans.context.ConversationContext;
@@ -116,7 +116,7 @@
     public Conversation getCurrentConversation()
     {
 
-        Bean<Conversation> bean = (Bean<Conversation>)BeanManagerImpl.getManager().resolveByType(Conversation.class,
new CurrentLiteral()).iterator().next();
+        Bean<Conversation> bean = (Bean<Conversation>)BeanManagerImpl.getManager().resolveByType(Conversation.class,
new DefaultLiteral()).iterator().next();
         Conversation conversation = BeanManagerImpl.getManager().getInstance(bean);
 
         return conversation;

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java
Fri Oct  9 22:21:47 2009
@@ -24,7 +24,7 @@
 
 import javax.enterprise.inject.spi.Decorator;
 
-import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.component.AbstractBean;
 import org.apache.webbeans.container.BeanManagerImpl;
 import org.apache.webbeans.decorator.xml.WebBeansXMLDecorator;
@@ -106,7 +106,7 @@
 
         if (listAnnot.isEmpty())
         {
-            listAnnot.add(new CurrentLiteral());
+            listAnnot.add(new DefaultLiteral());
         }
 
         while (it.hasNext())

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/BeanObserverImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/BeanObserverImpl.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/BeanObserverImpl.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/BeanObserverImpl.java
Fri Oct  9 22:21:47 2009
@@ -25,7 +25,7 @@
 import javax.enterprise.event.Observer;
 import javax.enterprise.event.Observes;
 
-import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.component.AbstractBean;
 import org.apache.webbeans.component.InjectionTargetBean;
 import org.apache.webbeans.container.InjectionResolver;
@@ -194,7 +194,7 @@
                 if (annot.length == 0)
                 {
                     annot = new Annotation[1];
-                    annot[0] = new CurrentLiteral();
+                    annot[0] = new DefaultLiteral();
                 }
                 else
                 {

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=823718&r1=823717&r2=823718&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
Fri Oct  9 22:21:47 2009
@@ -58,6 +58,10 @@
     @SuppressWarnings("unchecked")
     public Object invoke(Object instance, Method method, Method proceed, Object[] arguments)
throws Exception
     {
+        Object result = null;
+        
+        boolean interceptorRun = false;
+        
         //Context of the bean
         Context webbeansContext = BeanManagerImpl.getManager().getContext(component.getScope());
         
@@ -69,6 +73,9 @@
         {
             checkDecoratorStackForSameDecorator(method);
 
+            //Gets component decorator stack
+            List<Object> decorators = component.getDecoratorStack();
+                        
             // Run around invoke chain
             List<InterceptorData> stack = component.getInterceptorStack();
             
@@ -88,17 +95,21 @@
             //Call Around Invokes
             if (WebBeansUtil.isContainsInterceptorMethod(temp, InterceptorType.AROUND_INVOKE))
             {
-                return callAroundInvokes(method, arguments, WebBeansUtil.getInterceptorMethods(stack,
InterceptorType.AROUND_INVOKE));
+                result = callAroundInvokes(method, arguments, WebBeansUtil.getInterceptorMethods(stack,
InterceptorType.AROUND_INVOKE));
+                interceptorRun = true;
             }
-
-            //Gets component decorator stack
-            List<Object> decorators = component.getDecoratorStack();
             
             //Call decarators
-            callDecorators(decorators, method, arguments);
+            callDecorators(decorators, method, arguments);            
+            
 
         }
 
+        if(interceptorRun)
+        {
+            return result;
+        }
+        
         if (!method.isAccessible())
         {
             method.setAccessible(true);

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InvocationContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InvocationContextImpl.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InvocationContextImpl.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InvocationContextImpl.java
Fri Oct  9 22:21:47 2009
@@ -22,11 +22,10 @@
 import javax.enterprise.context.spi.Context;
 import javax.enterprise.context.spi.Contextual;
 import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.inject.spi.Bean;
 import javax.interceptor.InvocationContext;
 
+import org.apache.webbeans.component.AbstractBean;
 import org.apache.webbeans.container.BeanManagerImpl;
-import org.apache.webbeans.context.creational.CreationalContextFactory;
 
 /**
  * Implementation of the {@link InvocationContext} interface.
@@ -67,7 +66,7 @@
      * @param datas interceptor stack
      * @param type interceptor type
      */
-    public InvocationContextImpl(Bean<?> bean, Object instance, Method method, Object[]
parameters, List<InterceptorData> datas, InterceptorType type)
+    public InvocationContextImpl(AbstractBean<?> bean, Object instance, Method method,
Object[] parameters, List<InterceptorData> datas, InterceptorType type)
     {
         this.method = method;
         this.parameters = parameters;
@@ -86,11 +85,11 @@
 
     
     @SuppressWarnings("unchecked")
-    private void configureTarget(Bean<?> bean)
+    private void configureTarget(AbstractBean<?> bean)
     {
         Context webbeansContext = BeanManagerImpl.getManager().getContext(bean.getScope());
         
-        this.target = webbeansContext.get((Contextual<Object>)bean, (CreationalContext<Object>)CreationalContextFactory.getInstance().getCreationalContext(bean));
       
+        this.target = webbeansContext.get((Contextual<Object>)bean, (CreationalContext<Object>)bean.getCreationalContext());
       
         
     }
     

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Fri Oct  9 22:21:47 2009
@@ -68,7 +68,7 @@
 import javax.interceptor.InvocationContext;
 
 import org.apache.webbeans.annotation.ApplicationScopeLiteral;
-import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.annotation.DependentScopeLiteral;
 import org.apache.webbeans.annotation.NewLiteral;
 import org.apache.webbeans.annotation.ProductionLiteral;
@@ -600,7 +600,7 @@
         DefinitionUtil.defineApiTypes(comp, clazz);
         
         comp.setImplScopeType(new ApplicationScopeLiteral());
-        comp.addQualifier(new CurrentLiteral());
+        comp.addQualifier(new DefaultLiteral());
         comp.setType(new ProductionLiteral());
         
         DefinitionUtil.defineObserverMethods(comp, clazz);
@@ -689,7 +689,7 @@
 
         managerComponent.setImplScopeType(new DependentScopeLiteral());
         managerComponent.setType(new StandardLiteral());
-        managerComponent.addQualifier(new CurrentLiteral());
+        managerComponent.addQualifier(new DefaultLiteral());
         managerComponent.addApiType(BeanManager.class);
         managerComponent.addApiType(Object.class);
 
@@ -734,7 +734,7 @@
         conversationComp.addApiType(Object.class);
         conversationComp.setImplScopeType(new RequestedScopeLiteral());
         conversationComp.setType(new StandardLiteral());
-        conversationComp.addQualifier(new CurrentLiteral());
+        conversationComp.addQualifier(new DefaultLiteral());
         conversationComp.setName("javax.context.conversation");
 
         return conversationComp;

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
Fri Oct  9 22:21:47 2009
@@ -46,7 +46,7 @@
 import javax.interceptor.Interceptor;
 
 import org.apache.webbeans.WebBeansConstants;
-import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.annotation.ProductionLiteral;
 import org.apache.webbeans.component.AbstractBean;
 import org.apache.webbeans.component.xml.XMLManagedBean;
@@ -1671,7 +1671,7 @@
 
         if (!isDefined)
         {
-            component.addQualifier(new CurrentLiteral());
+            component.addQualifier(new DefaultLiteral());
         }
 
     }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java
Fri Oct  9 22:21:47 2009
@@ -29,7 +29,7 @@
 import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
 import org.apache.webbeans.WebBeansConstants;
-import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.annotation.WebBeansAnnotation;
 import org.apache.webbeans.component.xml.XMLProducerBean;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
@@ -675,7 +675,7 @@
 
             if (bindingAnnots.isEmpty())
             {
-                model.addBindingType(new CurrentLiteral());
+                model.addBindingType(new DefaultLiteral());
             }
 
             for (Annotation annot : bindingAnnots)
@@ -902,7 +902,7 @@
 
         if (anns.size() == 0)
         {
-            model.addBindingType(new CurrentLiteral());
+            model.addBindingType(new DefaultLiteral());
         }
 
         for (Annotation ann : anns)
@@ -952,7 +952,7 @@
 
         if (anns.size() == 0)
         {
-            component.addQualifier(new CurrentLiteral());
+            component.addQualifier(new DefaultLiteral());
         }
 
         for (Annotation ann : anns)

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/CheckWithCheckPaymentDecoratorField.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/CheckWithCheckPaymentDecoratorField.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/CheckWithCheckPaymentDecoratorField.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/CheckWithCheckPaymentDecoratorField.java
Fri Oct  9 22:21:47 2009
@@ -14,7 +14,6 @@
 package org.apache.webbeans.test.component;
 
 import javax.enterprise.context.RequestScoped;
-import javax.inject.Named;
 import javax.enterprise.inject.deployment.Production;
 
 import org.apache.webbeans.test.annotation.binding.Check;
@@ -22,7 +21,6 @@
 @Production
 @RequestScoped
 @Check(type = "CHECK")
-@Named
 public class CheckWithCheckPaymentDecoratorField implements IPayment
 {
 

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/AccountComponent.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/AccountComponent.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/AccountComponent.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/AccountComponent.java
Fri Oct  9 22:21:47 2009
@@ -17,11 +17,9 @@
 
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.inject.Default;
-import javax.inject.Named;
 import javax.enterprise.inject.deployment.Production;
 
 @Production
-@Named
 @RequestScoped
 @Default
 public class AccountComponent implements Account

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/ServiceDecorator.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/ServiceDecorator.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/ServiceDecorator.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/clean/ServiceDecorator.java
Fri Oct  9 22:21:47 2009
@@ -17,7 +17,6 @@
 import javax.decorator.Decorator;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.inject.Any;
-import javax.enterprise.inject.Default;
 import javax.inject.Named;
 
 import org.apache.webbeans.test.annotation.binding.Binding1;
@@ -26,7 +25,6 @@
 @Decorator
 @Named
 @RequestScoped
-@Default
 public abstract class ServiceDecorator implements IService
 {
     @Decorates @Any @Binding1

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/service/ServiceImpl1.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/service/ServiceImpl1.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/service/ServiceImpl1.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/service/ServiceImpl1.java
Fri Oct  9 22:21:47 2009
@@ -14,7 +14,6 @@
 package org.apache.webbeans.test.component.service;
 
 import javax.enterprise.context.ApplicationScoped;
-import javax.inject.Named;
 import javax.enterprise.inject.deployment.Production;
 
 import org.apache.webbeans.test.annotation.binding.Binding1;
@@ -22,7 +21,6 @@
 @Production
 @Binding1
 @ApplicationScoped
-@Named
 public class ServiceImpl1 implements IService
 {
 

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java
Fri Oct  9 22:21:47 2009
@@ -25,7 +25,7 @@
 
 import junit.framework.Assert;
 
-import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.component.AbstractBean;
 import org.apache.webbeans.context.ContextFactory;
 import org.apache.webbeans.test.annotation.binding.Binding1Literal;
@@ -105,7 +105,7 @@
         Set<Type> apiTyeps = new HashSet<Type>();
         apiTyeps.add(Account.class);
 
-        List<Decorator<?>> decs = getManager().resolveDecorators(apiTyeps, new
Annotation[] { new CurrentLiteral() });
+        List<Decorator<?>> decs = getManager().resolveDecorators(apiTyeps, new
Annotation[] { new DefaultLiteral() });
 
         LargeTransactionDecorator dec = (LargeTransactionDecorator) getManager().getInstance(decs.get(0));
         Assert.assertEquals(new BigDecimal(1500), dec.getDepositeAmount());

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
Fri Oct  9 22:21:47 2009
@@ -20,7 +20,7 @@
 import junit.framework.Assert;
 
 import org.apache.webbeans.annotation.AnyLiteral;
-import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.component.AbstractBean;
 import org.apache.webbeans.context.ContextFactory;
 import org.apache.webbeans.test.annotation.binding.Check;

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/portable/events/ExtensionTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/portable/events/ExtensionTest.java?rev=823718&r1=823717&r2=823718&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/portable/events/ExtensionTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/portable/events/ExtensionTest.java
Fri Oct  9 22:21:47 2009
@@ -17,7 +17,7 @@
 
 import junit.framework.Assert;
 
-import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.context.ContextFactory;
 import org.apache.webbeans.portable.events.ExtensionLoader;
 import org.apache.webbeans.test.component.library.BookShop;
@@ -48,7 +48,7 @@
         
         MockServletContext servletContext = new MockServletContext();
         ContextFactory.initApplicationContext(servletContext);
-        Bean<MyExtension> extension = (Bean<MyExtension>)getManager().resolveByType(MyExtension.class,
new CurrentLiteral()).iterator().next();
+        Bean<MyExtension> extension = (Bean<MyExtension>)getManager().resolveByType(MyExtension.class,
new DefaultLiteral()).iterator().next();
         
         MyExtension ext = getManager().getInstance(extension);
         System.out.println(ext.toString());



Mime
View raw message