Index: /home/ejort/jboss-4.0/testsuite/src/main/org/jboss/test/bmp/beans/SimpleBMPBean.java =================================================================== --- /home/ejort/jboss-4.0/testsuite/src/main/org/jboss/test/bmp/beans/SimpleBMPBean.java (revision 58405) +++ /home/ejort/jboss-4.0/testsuite/src/main/org/jboss/test/bmp/beans/SimpleBMPBean.java (working copy) @@ -40,6 +40,7 @@ import javax.sql.DataSource; import org.jboss.logging.Logger; +import org.jboss.test.bmp.interfaces.SimpleBMPHome; public class SimpleBMPBean implements EntityBean { @@ -53,6 +54,8 @@ // bmp fields Integer id; String name; + boolean ejbStoreInvoked = false; + boolean tempEjbStoreInvoked = false; public Integer ejbCreate (int _id, String _name) throws CreateException, RemoteException @@ -162,6 +165,19 @@ throws CreateException, RemoteException { log.debug ("ejbPostCreate (int, String) called"); + + tempEjbStoreInvoked = false; + // Do a find all to see whether ejbStore gets invoked + SimpleBMPHome home = (SimpleBMPHome) ctx.getEJBHome(); + try + { + home.findAll(); + } + catch (FinderException e) + { + throw new RemoteException("Unexpected error invoking findAll", e); + } + ejbStoreInvoked = tempEjbStoreInvoked; } public void ejbPostCreateMETHOD (int _id, String _name) @@ -209,6 +225,7 @@ public void ejbStore () { log.debug ("ejbStore () called " + this); + tempEjbStoreInvoked = true; Connection con = null; try @@ -405,5 +422,8 @@ return name; } - + public boolean isEjbStoreInvoked() + { + return ejbStoreInvoked; + } } Index: /home/ejort/jboss-4.0/testsuite/src/main/org/jboss/test/bmp/interfaces/SimpleBMP.java =================================================================== --- /home/ejort/jboss-4.0/testsuite/src/main/org/jboss/test/bmp/interfaces/SimpleBMP.java (revision 58405) +++ /home/ejort/jboss-4.0/testsuite/src/main/org/jboss/test/bmp/interfaces/SimpleBMP.java (working copy) @@ -30,4 +30,5 @@ public void setName (String _name) throws RemoteException; public String getName () throws RemoteException; Integer getIdViaEJBObject() throws RemoteException; + boolean isEjbStoreInvoked() throws RemoteException; } Index: /home/ejort/jboss-4.0/testsuite/src/main/org/jboss/test/bmp/test/BmpUnitTestCase.java =================================================================== --- /home/ejort/jboss-4.0/testsuite/src/main/org/jboss/test/bmp/test/BmpUnitTestCase.java (revision 58405) +++ /home/ejort/jboss-4.0/testsuite/src/main/org/jboss/test/bmp/test/BmpUnitTestCase.java (working copy) @@ -134,6 +134,9 @@ it = home.findAll ().iterator (); while (it.hasNext ()) ((SimpleBMP)it.next ()).remove (); + + SimpleBMP b2 = home.create(200, "Dave"); + assertFalse(b2.isEjbStoreInvoked()); } finally {