[jboss-cvs] JBossAS SVN: r82275 - projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Dec 15 03:57:15 EST 2008
Author: wolfc
Date: 2008-12-15 03:57:15 -0500 (Mon, 15 Dec 2008)
New Revision: 82275
Modified:
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived/Contained.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived/ContainedBean.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived/ShoppingCartBean.java
Log:
EJBTHREE-1241: contained beans must be removed manually
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived/Contained.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived/Contained.java 2008-12-15 08:55:52 UTC (rev 82274)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived/Contained.java 2008-12-15 08:57:15 UTC (rev 82275)
@@ -38,4 +38,6 @@
void updateCustomer();
boolean isActivated();
+
+ void remove();
}
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived/ContainedBean.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived/ContainedBean.java 2008-12-15 08:55:52 UTC (rev 82274)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived/ContainedBean.java 2008-12-15 08:57:15 UTC (rev 82275)
@@ -26,6 +26,7 @@
import javax.annotation.PreDestroy;
import javax.ejb.PostActivate;
import javax.ejb.PrePassivate;
+import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@@ -99,4 +100,9 @@
{
destroyed = true;
}
+
+ @Remove
+ public void remove()
+ {
+ }
}
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived/ShoppingCartBean.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived/ShoppingCartBean.java 2008-12-15 08:55:52 UTC (rev 82274)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/longlived/ShoppingCartBean.java 2008-12-15 08:57:15 UTC (rev 82275)
@@ -123,5 +123,10 @@
@Remove
- public void checkout() {}
+ public void checkout()
+ {
+ // contained stateful beans should be removed manually, there might be a reference
+ // lying out there.
+ contained.remove();
+ }
}
More information about the jboss-cvs-commits
mailing list