tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1443471 - /tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java
Date Thu, 07 Feb 2013 13:49:25 GMT
Author: rmannibucau
Date: Thu Feb  7 13:49:25 2013
New Revision: 1443471

URL: http://svn.apache.org/viewvc?rev=1443471&view=rev
Log:
validation of passivation for EJB shouldn't use directly isPassivationCapable but is the scope
passivable

Modified:
    tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java?rev=1443471&r1=1443470&r2=1443471&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java
(original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java
Thu Feb  7 13:49:25 2013
@@ -72,7 +72,8 @@ public class CdiEjbBean<T> extends BaseE
 
     @Override // copied to be able to produce EM (should be fixed in OWB for next CDI spec)
     public void validatePassivationDependencies() {
-        if(isPassivationCapable()) {
+        // if(isPassivationCapable()) {
+        if(getWebBeansContext().getBeanManagerImpl().isPassivatingScope(getScope())) { //
not @Dependent otherwise we either can't inject EJB in serializable beans or the opposite
             final Set<InjectionPoint> beanInjectionPoints = getInjectionPoints();
             for(InjectionPoint injectionPoint : beanInjectionPoints) {
                 if(!injectionPoint.isTransient()) {
@@ -82,6 +83,7 @@ public class CdiEjbBean<T> extends BaseE
                                 || EntityManager.class.equals(injectionPoint.getAnnotated().getBaseType()))
{
                             continue;
                         }
+
                         throw new WebBeansConfigurationException(
                                 "Passivation capable beans must satisfy passivation capable
dependencies. " +
                                         "Bean : " + toString() + " does not satisfy. Details
about the Injection-point: " +



Mime
View raw message