[jboss-cvs] JBossAS SVN: r82248 - in projects/ejb3/trunk/testsuite/src/test: java/org/jboss/ejb3/test/stateful/unit and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Dec 12 12:48:23 EST 2008
Author: wolfc
Date: 2008-12-12 12:48:23 -0500 (Fri, 12 Dec 2008)
New Revision: 82248
Modified:
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/Stateful.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/StatefulBean.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/TreeCacheStatefulBean.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/unit/MetricsUnitTestCase.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
projects/ejb3/trunk/testsuite/src/test/resources/test/stateful/META-INF/ejb-jar.xml
Log:
EJBTHREE-1241: disambiguate the remove method
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/Stateful.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/Stateful.java 2008-12-12 17:15:59 UTC (rev 82247)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/Stateful.java 2008-12-12 17:48:23 UTC (rev 82248)
@@ -45,7 +45,7 @@
public void testExceptionCause() throws Exception;
public void testSerializedState(String state);
- public void remove();
+ public void removeMe();
public int beansRemoved();
void testResources() throws Exception;
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/StatefulBean.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/StatefulBean.java 2008-12-12 17:15:59 UTC (rev 82247)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/StatefulBean.java 2008-12-12 17:48:23 UTC (rev 82248)
@@ -229,7 +229,7 @@
}
// @Remove from xml
- public void remove()
+ public void removeMe()
{
++beansRemoved;
}
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/TreeCacheStatefulBean.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/TreeCacheStatefulBean.java 2008-12-12 17:15:59 UTC (rev 82247)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/TreeCacheStatefulBean.java 2008-12-12 17:48:23 UTC (rev 82248)
@@ -210,7 +210,7 @@
}
@Remove
- public void remove()
+ public void removeMe()
{
++beansRemoved;
}
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/unit/MetricsUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/unit/MetricsUnitTestCase.java 2008-12-12 17:15:59 UTC (rev 82247)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/unit/MetricsUnitTestCase.java 2008-12-12 17:48:23 UTC (rev 82248)
@@ -114,14 +114,14 @@
size = (Integer)server.getAttribute(testerName, "RemoveCount");
assertEquals(0, size);
- another.remove();
+ another.removeMe();
size = (Integer)server.getAttribute(testerName, "CacheSize");
assertEquals(1, size);
size = (Integer)server.getAttribute(testerName, "RemoveCount");
assertEquals(1, size);
- stateful.remove();
+ stateful.removeMe();
size = (Integer)server.getAttribute(testerName, "CacheSize");
assertEquals(0, size);
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java 2008-12-12 17:15:59 UTC (rev 82247)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java 2008-12-12 17:48:23 UTC (rev 82248)
@@ -187,7 +187,7 @@
Stateful stateful = (Stateful)getInitialContext().lookup("Stateful");
assertNotNull(stateful);
stateful.setState("state");
- stateful.remove();
+ stateful.removeMe();
ObjectName deployment = new ObjectName("test.ejb3:name=Bill,service=EJB3");
@@ -198,7 +198,7 @@
stateful = (Stateful)getInitialContext().lookup("Stateful");
assertNotNull(stateful);
stateful.setState("state");
- stateful.remove();
+ stateful.removeMe();
}
public void testSmallCache() throws Exception
@@ -624,11 +624,12 @@
client.setSimple("somebody", "password");
client.login();
- System.out.println("testPassivation");
Stateful stateful = (Stateful)getInitialContext().lookup("Stateful");
assertNotNull(stateful);
- stateful.remove();
+ int startingRemoveCount = stateful.beansRemoved();
+
+ stateful.removeMe();
try
{
stateful.getState();
@@ -642,7 +643,7 @@
assertNotNull(stateful);
stateful.setState("InMyTimeOfDying");
- stateful.remove();
+ stateful.removeMe();
try
{
stateful.getState();
@@ -656,7 +657,7 @@
assertNotNull(home);
Stateful21 stateful21 = (Stateful21)home.create();
assertNotNull(stateful21);
- stateful21.remove();
+ stateful21.removeMe();
try
{
@@ -669,7 +670,7 @@
stateful = (Stateful)getInitialContext().lookup("Stateful");
int beansRemoved = stateful.beansRemoved();
- assertEquals(3, beansRemoved);
+ assertEquals(3, beansRemoved - startingRemoveCount);
}
public void testRemoveWithRollback() throws Exception
Modified: projects/ejb3/trunk/testsuite/src/test/resources/test/stateful/META-INF/ejb-jar.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/stateful/META-INF/ejb-jar.xml 2008-12-12 17:15:59 UTC (rev 82247)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/stateful/META-INF/ejb-jar.xml 2008-12-12 17:48:23 UTC (rev 82248)
@@ -15,7 +15,7 @@
<ejb-class>org.jboss.ejb3.test.stateful.StatefulBean</ejb-class>
<remove-method>
<bean-method>
- <method-name>remove</method-name>
+ <method-name>removeMe</method-name>
</bean-method>
<retain-if-exception>false</retain-if-exception>
</remove-method>
More information about the jboss-cvs-commits
mailing list