User: mnf999  
  Date: 01/07/03 15:54:34

  Modified:    src/main/org/jboss/ejb EntityContainer.java
  Log:
  Wire the context in the instance interceptor (idea of bill b)
  
  Revision  Changes    Path
  1.44      +17 -11    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.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- EntityContainer.java      2001/06/24 03:06:45     1.43
  +++ EntityContainer.java      2001/07/03 22:54:34     1.44
  @@ -32,6 +32,7 @@
   
   /**
   *   This is a Container for EntityBeans (both BMP and CMP).
  +*   
   *
   *   @see Container
   *   @see EntityEnterpriseContext
  @@ -40,8 +41,18 @@
   *   @author <a href="mailto:[EMAIL PROTECTED]";>Sebastien Alborini</a>
   *   @author <a href="mailto:[EMAIL PROTECTED]";>Daniel OConnor</a>
   *   @author <a href="[EMAIL PROTECTED]">Bill Burke</a>
  -*   @version $Revision: 1.43 $
  +*   @version $Revision: 1.44 $
  +*
  +* 
  +*   <p><b>Revisions:</b>
  +*
  +*   <p><b>20010701 marc fleury:</b>
  +*   <ul>
  +*   <li>Transaction to context wiring was moved to the instance interceptor
  +*   </ul>
   */
  +
  +
   public class EntityContainer
   extends Container
   implements ContainerInvokerContainer, InstancePoolContainer
  @@ -370,14 +381,12 @@
         
getPersistenceManager().removeEntity((EntityEnterpriseContext)mi.getEnterpriseContext());
   
         // We signify "removed" with a null id
  +             // There is no need to synchronize on the context since all the 
threads reaching here have
  +             // gone through the InstanceInterceptor so the instance is locked and 
we only have one thread 
  +             // the case of reentrant threads is unclear (would you want to delete 
an instance in reentrancy)
         mi.getEnterpriseContext().setId(null);
      }
   
  -   /**
  -   * MF FIXME these are implemented on the client
  -   *
  -   * For the JRMP CI yes, but should be implemented for other CI's
  -   */
      public Handle getHandle(MethodInvocation mi)
      throws java.rmi.RemoteException
      {
  @@ -851,11 +860,8 @@
            }
            else
            {
  -            //wire the transaction on the context, this is how the instance 
remember the tx
  -            if (mi.getEnterpriseContext().getTransaction() == null)
  -               mi.getEnterpriseContext().setTransaction(mi.getTransaction());
  -
  -            // Invoke and handle exceptions
  +    
  +              // Invoke and handle exceptions
               try
               {
                  return m.invoke(mi.getEnterpriseContext().getInstance(), 
mi.getArguments());
  
  
  

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

Reply via email to