openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1003072 - in /openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component: BaseEjbBean.java EjbBeanCreatorImpl.java
Date Thu, 30 Sep 2010 14:18:17 GMT
Author: covener
Date: Thu Sep 30 14:18:17 2010
New Revision: 1003072

URL: http://svn.apache.org/viewvc?rev=1003072&view=rev
Log:
[OWB-465] allow for an EJB provider to communicate that it needs the bean-class and superclasses
added to API types (over and above local interfaces) for e.g. @LocalBean.


Modified:
    openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java
    openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/EjbBeanCreatorImpl.java

Modified: openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java?rev=1003072&r1=1003071&r2=1003072&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java
(original)
+++ openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/BaseEjbBean.java
Thu Sep 30 14:18:17 2010
@@ -244,6 +244,14 @@ public abstract class BaseEjbBean<T> ext
         return dependentSFSBToBeRemoved.get(proxy);
     }
     
-
+    /**
+     * 
+     * @return true if the bean supports a no-interface (bean-class) local view but 
+     * the container does not return it in the list of business local interfaces.
+     */
+    public boolean needsBeanLocalViewAddedToTypes()
+    {
+        return false;
+    }
 
 }
\ No newline at end of file

Modified: openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/EjbBeanCreatorImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/EjbBeanCreatorImpl.java?rev=1003072&r1=1003071&r2=1003072&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/EjbBeanCreatorImpl.java
(original)
+++ openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/EjbBeanCreatorImpl.java
Thu Sep 30 14:18:17 2010
@@ -92,6 +92,14 @@ public class EjbBeanCreatorImpl<T> exten
             }
             
             getBean().addApiType(Object.class);
+            
+            if (getBean().needsBeanLocalViewAddedToTypes())
+            {
+                for(Class<?> clazz = getBean().getBeanClass(); !clazz.equals(Object.class);
clazz = clazz.getSuperclass()) 
+                { 
+                    getBean().addApiType(clazz);    
+                }   
+            }
         }
         else
         {  
@@ -123,4 +131,4 @@ public class EjbBeanCreatorImpl<T> exten
     {
         return BaseEjbBean.class.cast(super.getBean());
     }    
-}
\ No newline at end of file
+}



Mime
View raw message