User: patriot1burke
  Date: 01/10/05 14:56:10

  Modified:    src/main/org/jboss/ejb Tag: Branch_2_4 EntityContainer.java
  Log:
  forgot to backmerge calls to synchronizeEntitiesWithinTransaction in remove() and 
find()
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.41.2.2  +16 -1     jboss/src/main/org/jboss/ejb/EntityContainer.java
  
  Index: EntityContainer.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/EntityContainer.java,v
  retrieving revision 1.41.2.1
  retrieving revision 1.41.2.2
  diff -u -r1.41.2.1 -r1.41.2.2
  --- EntityContainer.java      2001/09/04 01:51:49     1.41.2.1
  +++ EntityContainer.java      2001/10/05 21:56:10     1.41.2.2
  @@ -40,7 +40,7 @@
   *   @author <a href="mailto:[EMAIL PROTECTED]";>Sebastien Alborini</a>
   *   @author Daniel OConnor ([EMAIL PROTECTED])
   *   @author <a href="[EMAIL PROTECTED]">Bill Burke</a>
  -*   @version $Revision: 1.41.2.1 $
  +*   @version $Revision: 1.41.2.2 $
   */
   public class EntityContainer
   extends Container
  @@ -431,6 +431,10 @@
      public void remove(MethodInvocation mi)
      throws java.rmi.RemoteException, RemoveException
      {
  +      // synchronize entities with the datastore before the bean is removed
  +      // this will write queued updates so datastore will be consistent before 
removal
  +      synchronizeEntitiesWithinTransaction(mi.getTransaction());
  +
         // Get the persistence manager to do the dirty work
         
getPersistenceManager().removeEntity((EntityEnterpriseContext)mi.getEnterpriseContext());
   
  @@ -506,6 +510,11 @@
      public Object findLocal(MethodInvocation mi)
      throws Exception
      {
  +      /**
  +       * As per the spec 9.6.4, entities must be synchronized with the datastore
  +       * when an ejbFind<METHOD> is called.
  +       */
  +      synchronizeEntitiesWithinTransaction(mi.getTransaction());
   
         // Multi-finder?
         if (!mi.getMethod().getReturnType().equals(getLocalClass()))
  @@ -559,6 +568,12 @@
      public Object find(MethodInvocation mi)
      throws Exception
      {
  +
  +      /**
  +       * As per the spec 9.6.4, entities must be synchronized with the datastore
  +       * when an ejbFind<METHOD> is called.
  +       */
  +      synchronizeEntitiesWithinTransaction(mi.getTransaction());
   
         // Multi-finder?
         if (!mi.getMethod().getReturnType().equals(getRemoteClass()))
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to