From: Scott M S. <st...@us...> - 2002-05-03 13:55:51
|
User: starksm Date: 02/05/03 06:55:50 Modified: src/main/org/jboss/test/cts/ejb Tag: Branch_3_0 StatefulSessionBean.java Log: Add tests for passiviation by size and by time. Use the new container-configuration extends attribute to override the "Standard Stateful SessionBean" configuration Revision Changes Path No revision No revision 1.14.2.2 +10 -52 jbosstest/src/main/org/jboss/test/cts/ejb/StatefulSessionBean.java Index: StatefulSessionBean.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/cts/ejb/StatefulSessionBean.java,v retrieving revision 1.14.2.1 retrieving revision 1.14.2.2 diff -u -r1.14.2.1 -r1.14.2.2 --- StatefulSessionBean.java 18 Apr 2002 16:55:36 -0000 1.14.2.1 +++ StatefulSessionBean.java 3 May 2002 13:55:50 -0000 1.14.2.2 @@ -11,11 +11,10 @@ import org.jboss.test.util.ejb.SessionSupport; -/** +/** The stateful session ejb implementation * - * @see <related> - * @author $Author: starksm $ - * @version $Revision: 1.14.2.1 $ + * @author Sco...@jb... + * @version $Revision: 1.14.2.2 $ */ public class StatefulSessionBean extends SessionSupport @@ -26,16 +25,9 @@ private int counter; private CtsCmpLocal entityBean; private Context enc; + private boolean wasActivated; private boolean wasPassivated; - /** - * Method ejbCreate - * - * - * @throws CreateException - * - */ - public void ejbCreate () throws CreateException { @@ -44,7 +36,7 @@ public void ejbActivate() { log.debug("Called ejbActivate( )..."); - wasPassivated = true; + wasActivated = true; } public void ejbPassivate() { @@ -66,64 +58,26 @@ log.debug("Called beforeCompletion( )..."); } - /** - * Method method1 - * - * - * @param msg - * - * @return - * - */ - public String method1 (String msg) { return msg; } - /** - * Method incCounter - * - * - */ - public void incCounter () { counter++; } - /** - * Method decCounter - * - * - */ - public void decCounter () { counter--; } - /** - * Method getCounter - * - * - * @return - * - */ - public int getCounter () { return counter; } - /** - * Method setCounter - * - * - * @param value - * - */ - public void setCounter (int value) { counter = value; @@ -186,6 +140,11 @@ bean.method1("Hello"); } + public boolean getWasActivated() + { + return wasActivated; + } + public boolean getWasPassivated() { return wasPassivated; @@ -217,4 +176,3 @@ } } -/*------ Formatted by Jindent 3.23 Basic 1.0 --- http://www.jindent.de ------*/ |