openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r914986 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: component/ context/creational/ intercept/ util/
Date Mon, 22 Feb 2010 17:51:12 GMT
Author: gerdogdu
Date: Mon Feb 22 17:51:12 2010
New Revision: 914986

URL: http://svn.apache.org/viewvc?rev=914986&view=rev
Log:
Refactoring of recently committed changes.

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ManagedBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java?rev=914986&r1=914985&r2=914986&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
Mon Feb 22 17:51:12 2010
@@ -22,6 +22,7 @@
 import java.util.List;
 import java.util.Set;
 
+import javax.enterprise.context.Dependent;
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.CreationException;
 import javax.enterprise.inject.spi.Bean;
@@ -581,8 +582,9 @@
     }
 
     @Override
-    public boolean isDependent() {
-        return false;
+    public boolean isDependent() 
+    {
+        return getScope().equals(Dependent.class);
     }
     
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java?rev=914986&r1=914985&r2=914986&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
Mon Feb 22 17:51:12 2010
@@ -17,7 +17,6 @@
 import java.lang.annotation.Annotation;
 import java.util.Set;
 
-import javax.enterprise.context.Dependent;
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.InjectionPoint;
@@ -217,15 +216,5 @@
         }
         
         return false;
-    }
-    
-    /**
-     * look at a Dependent scope annotation.
-     */
-    @Override
-    public boolean isDependent() {
-        return getScope().equals(Dependent.class);
-    }
-
-
-}
\ No newline at end of file
+    }    
+}

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java?rev=914986&r1=914985&r2=914986&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ConversationBean.java
Mon Feb 22 17:51:12 2010
@@ -16,7 +16,6 @@
 import javax.enterprise.context.Conversation;
 import javax.enterprise.context.spi.CreationalContext;
 
-import org.apache.webbeans.annotation.ApplicationScopeLiteral;
 import org.apache.webbeans.conversation.ConversationImpl;
 import org.apache.webbeans.conversation.ConversationManager;
 import org.apache.webbeans.spi.ConversationService;
@@ -35,7 +34,6 @@
     public ConversationBean()
     {
         super(WebBeansType.CONVERSATION, Conversation.class);
-        setImplScopeType(new ApplicationScopeLiteral());
     }
 
     /**

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ManagedBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ManagedBean.java?rev=914986&r1=914985&r2=914986&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ManagedBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ManagedBean.java
Mon Feb 22 17:51:12 2010
@@ -16,7 +16,6 @@
 import java.io.Serializable;
 import java.lang.reflect.Constructor;
 
-import javax.enterprise.context.Dependent;
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.Decorator;
@@ -114,13 +113,4 @@
         
         return false;
     }
-
-    /**
-     * look at a Dependent scope annotation.
-     */
-    @Override
-    public boolean isDependent() {
-        return getScope().equals(Dependent.class);
-    }
-
 }
\ No newline at end of file

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java?rev=914986&r1=914985&r2=914986&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
Mon Feb 22 17:51:12 2010
@@ -31,7 +31,7 @@
 {
     private static final long serialVersionUID = -3416834742959340960L;
 
-    private transient Object incompleteInstance = null;
+    private Object incompleteInstance = null;
     
     private Object proxyInstance = null;
     

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java?rev=914986&r1=914985&r2=914986&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
Mon Feb 22 17:51:12 2010
@@ -340,6 +340,7 @@
                 {
                     if (intData.isDefinedWithWebBeansInterceptor())
                     {
+                        @SuppressWarnings("unchecked")
                         WebBeansInterceptor<Object> interceptor = (WebBeansInterceptor<Object>)intData.getWebBeansInterceptor();
                         CreationalContext<Object> creationalContext = manager.createCreationalContext(interceptor);
                         Object interceptorProxy = manager.getReference(interceptor,interceptor.getBeanClass(),
creationalContext);

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=914986&r1=914985&r2=914986&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Mon Feb 22 17:51:12 2010
@@ -2540,6 +2540,16 @@
     
     public static boolean isDependent(Bean<?> bean)
     {
+        if(!(bean instanceof OwbBean))
+        {
+            if(bean.getScope().equals(Dependent.class))
+            {
+                return true;
+            }
+            
+            return false;
+        }
+        
         return ((OwbBean) bean).isDependent();
     }
     



Mime
View raw message