User: simone  
  Date: 00/11/23 14:15:44

  Modified:    src/main/org/jboss/ejb/plugins EnterpriseInstanceCache.java
  Log:
  Changed behavior when a bean cannot be passivated: instead of keeping it in the 
cache, it is removed.
  
  Revision  Changes    Path
  1.6       +5 -5      
jboss/src/main/org/jboss/ejb/plugins/EnterpriseInstanceCache.java
  
  Index: EnterpriseInstanceCache.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/EnterpriseInstanceCache.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- EnterpriseInstanceCache.java      2000/11/09 09:43:15     1.5
  +++ EnterpriseInstanceCache.java      2000/11/23 22:15:43     1.6
  @@ -37,7 +37,7 @@
    * </ul>
    *
    * @author Simone Bordet ([EMAIL PROTECTED])
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    */
   public abstract class EnterpriseInstanceCache 
        implements InstanceCache, XmlLoadable
  @@ -337,7 +337,7 @@
                                                                try
                                                                {
                                                                        // If the next 
call throws RemoteException we can 
  -                                                                     // reinsert 
the context meaningfully in the cache
  +                                                                     // remove the 
context from the cache
                                                                        passivate(ctx);
                                                                        executed();
                                                                        removeLock(id);
  @@ -345,11 +345,11 @@
                                                                } 
                                                                catch (RemoteException 
x)
                                                                {
  -                                                                     // Can't 
passivate this bean, keep it in memory
  -                                                                     // Reinsert it 
in the cache
  +                                                                     // Can't 
passivate this bean, remove it
  +                                                                     // EJB 1.1, 
6.4.1
                                                                        synchronized 
(getCacheLock())
                                                                        {
  -                                                                             
getCache().insert(id, ctx);
  +                                                                             
getCache().remove(id);
                                                                        }
                                                                        throw x;
                                                                }
  
  
  

Reply via email to