User: simone  
  Date: 00/12/12 01:37:19

  Modified:    src/main/org/jboss/ejb/plugins BMPPersistenceManager.java
  Log:
  Updated references to renamed interface
  
  Revision  Changes    Path
  1.19      +17 -17    jboss/src/main/org/jboss/ejb/plugins/BMPPersistenceManager.java
  
  Index: BMPPersistenceManager.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/BMPPersistenceManager.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- BMPPersistenceManager.java        2000/12/07 15:44:23     1.18
  +++ BMPPersistenceManager.java        2000/12/12 09:37:18     1.19
  @@ -24,19 +24,19 @@
   
   import org.jboss.ejb.Container;
   import org.jboss.ejb.EntityContainer;
  -import org.jboss.ejb.EntityInstanceCache;
  +import org.jboss.ejb.EntityCache;
   import org.jboss.ejb.EntityPersistenceManager;
   import org.jboss.ejb.EntityEnterpriseContext;
   import org.jboss.logging.Logger;
   
   
   /**
  -*   <description> 
  -*      
  +*   <description>
  +*
   *   @see <related>
   *   @author Rickard �berg ([EMAIL PROTECTED])
   *  @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  -*   @version $Revision: 1.18 $
  +*   @version $Revision: 1.19 $
   */
   public class BMPPersistenceManager
   implements EntityPersistenceManager
  @@ -115,7 +115,7 @@
         Method postCreateMethod = (Method)postCreateMethods.get(m);
   
         Object id = null;
  -      try 
  +      try
         {
            // Call ejbCreate
            id = createMethod.invoke(ctx.getInstance(), args);
  @@ -123,7 +123,7 @@
         {
            // Throw this as a bean exception...(?)
            throw new EJBException(e);
  -      } catch (InvocationTargetException ite) 
  +      } catch (InvocationTargetException ite)
         {
                        Throwable e = ite.getTargetException();
            if (e instanceof CreateException)
  @@ -151,18 +151,18 @@
               throw (Exception)e;
            }
         }
  -         
  +
         // set the id
         ctx.setId(id);
   
         // Create a new CacheKey
  -      Object cacheKey = ((EntityInstanceCache) 
con.getInstanceCache()).createCacheKey( id );
  +      Object cacheKey = ((EntityCache) con.getInstanceCache()).createCacheKey( id );
   
         // Give it to the context
         ctx.setCacheKey(cacheKey);
   
         // Insert in cache, it is now safe
  -      ((EntityInstanceCache) con.getInstanceCache()).insert(ctx);
  +      con.getInstanceCache().insert(ctx);
   
         // Create EJBObject
         ctx.setEJBObject(con.getContainerInvoker().getEntityEJBObject(cacheKey));
  @@ -211,7 +211,7 @@
         Object objectId = callFinderMethod(finderMethod, args, ctx);
   
         // get the cache, create a new key and return this new key
  -      return ((EntityInstanceCache)con.getInstanceCache()).createCacheKey( objectId 
);
  +      return ((EntityCache)con.getInstanceCache()).createCacheKey( objectId );
      }
   
      public Collection findEntities(Method finderMethod, Object[] args, 
EntityEnterpriseContext ctx)
  @@ -236,7 +236,7 @@
            while (enum.hasMoreElements() == true)
            {
               // Wrap a cache key around the given object id/primary key
  -            array.add(((EntityInstanceCache) 
con.getInstanceCache()).createCacheKey(enum.nextElement()));
  +            array.add(((EntityCache) 
con.getInstanceCache()).createCacheKey(enum.nextElement()));
            }
            return array;
         }
  @@ -248,7 +248,7 @@
            while (enum.hasNext())
            {
               // Wrap a cache key around the given object id/primary key
  -            array.add(((EntityInstanceCache) 
con.getInstanceCache()).createCacheKey(enum.next()));
  +            array.add(((EntityCache) 
con.getInstanceCache()).createCacheKey(enum.next()));
            }
            return array;
         }
  @@ -417,7 +417,7 @@
            {
               // Wrap runtime exceptions
               throw new EJBException((Exception)e);
  -         } 
  +         }
         }
      }
      // Z implementation ----------------------------------------------
  @@ -427,7 +427,7 @@
      // Protected -----------------------------------------------------
   
      // Private -------------------------------------------------------
  -   private Object callFinderMethod(Method finderMethod, Object[] args, 
EntityEnterpriseContext ctx) 
  +   private Object callFinderMethod(Method finderMethod, Object[] args, 
EntityEnterpriseContext ctx)
      throws Exception
      {
         // Check if findByPrimaryKey
  @@ -448,14 +448,14 @@
   
         // invoke the finder method
         Object result = null;
  -      try 
  +      try
         {
            result = callMethod.invoke(ctx.getInstance(), args);
         } catch (IllegalAccessException e)
                {
                        // Throw this as a bean exception...(?)
                        throw new EJBException(e);
  -      } catch (InvocationTargetException ite) 
  +      } catch (InvocationTargetException ite)
                {
                        Throwable e = ite.getTargetException();
            if (e instanceof FinderException)
  @@ -483,7 +483,7 @@
               throw (Exception)e;
            }
         }
  -       
  +
         return result;
      }
   
  
  
  

Reply via email to