[webbeans-commits] Webbeans SVN: r1733 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating and 1 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Fri Feb 27 06:09:51 EST 2009
Author: pete.muir at jboss.org
Date: 2009-02-27 06:09:51 -0500 (Fri, 27 Feb 2009)
New Revision: 1733
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/District.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/EspooLocal_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/Espoo_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/EspooLocal_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/Espoo_Broken.java
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/BeanValidator.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/PassivatingContextTest.java
Log:
WBRI-150
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/BeanValidator.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/BeanValidator.java 2009-02-27 05:50:05 UTC (rev 1732)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/BeanValidator.java 2009-02-27 11:09:51 UTC (rev 1733)
@@ -98,6 +98,10 @@
{
throw new NullableDependencyException("The injection point " + injectionPoint + " has nullable dependencies");
}
+ if (Beans.isPassivatingBean(bean) && !resolvedBean.isSerializable())
+ {
+ throw new UnserializableDependencyException("The bean " + bean + " declares a passivating scopes but has non-serializable dependencies");
+ }
}
else
{
@@ -120,10 +124,6 @@
specializedBeans.add(abstractBean.getSpecializedBean());
}
}
- if (Beans.isPassivatingBean(bean) && !bean.isSerializable())
- {
- throw new UnserializableDependencyException("The bean " + bean + " declares a passivating scopes but has non-serializable dependencies");
- }
boolean normalScoped = MetaDataCache.instance().getScopeModel(bean.getScopeType()).isNormal();
if (normalScoped && !Beans.isBeanProxyable(bean))
{
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/EspooLocal_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/EspooLocal_Broken.java 2009-02-27 05:50:05 UTC (rev 1732)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/EspooLocal_Broken.java 2009-02-27 11:09:51 UTC (rev 1733)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.unit.context.passivating;
-
-import javax.ejb.Local;
-
- at Local
-public interface EspooLocal_Broken
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/Espoo_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/Espoo_Broken.java 2009-02-27 05:50:05 UTC (rev 1732)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/Espoo_Broken.java 2009-02-27 11:09:51 UTC (rev 1733)
@@ -1,18 +0,0 @@
-package org.jboss.jsr299.tck.unit.context.passivating;
-
-import javax.context.SessionScoped;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.inject.Current;
-
- at Stateful
- at SessionScoped
-class Espoo_Broken implements EspooLocal_Broken
-{
- @Current
- Violation reference;
-
- @Remove
- public void bye() {
- }
-}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/PassivatingContextTest.java 2009-02-27 05:50:05 UTC (rev 1732)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/PassivatingContextTest.java 2009-02-27 11:09:51 UTC (rev 1733)
@@ -8,7 +8,6 @@
import javax.context.SessionScoped;
import javax.inject.AnnotationLiteral;
import javax.inject.IllegalProductException;
-import javax.inject.UnserializableDependencyException;
import javax.inject.manager.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
@@ -94,14 +93,6 @@
assert testSerialize(vaasaBeans.iterator().next());
}
- @Test(groups = { "contexts", "passivation" , "ri-broken"}, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4", id = "k")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoStatefulSessionBeanFails()
- {
- // WBRI-150
- getCurrentManager().getInstanceByType(EspooLocal_Broken.class);
- }
-
@Test(groups = { "contexts", "passivation" })
@SpecAssertion(section = "8.4", id = "l")
public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoTransientFieldOK()
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/District.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/District.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/District.java 2009-02-27 11:09:51 UTC (rev 1733)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.unit.context.passivating.unserializableSimpleInjectedIntoPassivatingEnterpriseBean;
+
+import javax.context.Dependent;
+
+ at Dependent
+class District
+{
+
+ public void ping()
+ {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/District.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/EspooLocal_Broken.java (from rev 1724, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/EspooLocal_Broken.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/EspooLocal_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/EspooLocal_Broken.java 2009-02-27 11:09:51 UTC (rev 1733)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.context.passivating.unserializableSimpleInjectedIntoPassivatingEnterpriseBean;
+
+import javax.ejb.Local;
+
+ at Local
+public interface EspooLocal_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/EspooLocal_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/Espoo_Broken.java (from rev 1724, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/Espoo_Broken.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/Espoo_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/Espoo_Broken.java 2009-02-27 11:09:51 UTC (rev 1733)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.unit.context.passivating.unserializableSimpleInjectedIntoPassivatingEnterpriseBean;
+
+import javax.context.SessionScoped;
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Current;
+
+ at Stateful
+ at SessionScoped
+class Espoo_Broken implements EspooLocal_Broken
+{
+ @Current
+ District district;
+
+ @Remove
+ public void bye() {
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest.java 2009-02-27 11:09:51 UTC (rev 1733)
@@ -0,0 +1,27 @@
+package org.jboss.jsr299.tck.unit.context.passivating.unserializableSimpleInjectedIntoPassivatingEnterpriseBean;
+
+import javax.inject.UnserializableDependencyException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.jboss.jsr299.tck.impl.packaging.ExpectedDeploymentException;
+import org.jboss.jsr299.tck.impl.packaging.Packaging;
+import org.jboss.jsr299.tck.impl.packaging.PackagingType;
+import org.testng.annotations.Test;
+
+ at Artifact
+ at Packaging(PackagingType.EAR)
+ at ExpectedDeploymentException(UnserializableDependencyException.class)
+public class UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest extends AbstractDeclarativeTest
+{
+
+ @Test(groups = { "contexts", "passivation"})
+ @SpecAssertion(section = "8.4", id = "k")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoStatefulSessionBeanFails()
+ {
+ // WBRI-150
+ getCurrentManager().getInstanceByType(EspooLocal_Broken.class);
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/unserializableSimpleInjectedIntoPassivatingEnterpriseBean/UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
More information about the weld-commits
mailing list