User: simone
Date: 00/12/12 01:40:28
Modified: src/main/org/jboss/ejb/plugins EntityInstanceCache.java
Log:
Updated references to renamed interface and base class.
Updated getLock method signature.
Corrected exception throw in case of null argument
Revision Changes Path
1.3 +9 -7 jboss/src/main/org/jboss/ejb/plugins/EntityInstanceCache.java
Index: EntityInstanceCache.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/EntityInstanceCache.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- EntityInstanceCache.java 2000/12/07 15:44:23 1.2
+++ EntityInstanceCache.java 2000/12/12 09:40:27 1.3
@@ -14,15 +14,17 @@
import org.jboss.ejb.CacheKey;
import org.jboss.ejb.EnterpriseContext;
import org.jboss.ejb.EntityEnterpriseContext;
+import org.jboss.util.Sync;
/**
* Cache subclass for entity beans.
*
* @author Simone Bordet ([EMAIL PROTECTED])
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class EntityInstanceCache
- extends EnterpriseInstanceCache implements org.jboss.ejb.EntityInstanceCache
+ extends AbstractInstanceCache
+ implements org.jboss.ejb.EntityCache
{
// Constants -----------------------------------------------------
@@ -51,7 +53,7 @@
{
if (!(id instanceof CacheKey))
{
- throw new IllegalArgumentException("cache.get for entity beans
must have a CacheKey object as argument instead of " + id.getClass());
+ throw new IllegalArgumentException("cache.get for entity beans
must have a CacheKey object as argument instead of " + id);
}
return super.get(id);
}
@@ -59,15 +61,15 @@
{
if (!(id instanceof CacheKey))
{
- throw new IllegalArgumentException("cache.remove for entity
beans must have a CacheKey object as argument instead of " + id.getClass());
+ throw new IllegalArgumentException("cache.remove for entity
beans must have a CacheKey object as argument instead of " + id);
}
super.remove(id);
}
- public synchronized Object getLock(Object id)
+ public synchronized Sync getLock(Object id)
{
if (!(id instanceof CacheKey))
{
- throw new IllegalArgumentException("cache.getLock for entity
beans must have a CacheKey object as argument instead of " + id.getClass());
+ throw new IllegalArgumentException("cache.getLock for entity
beans must have a CacheKey object as argument instead of " + id);
}
return super.getLock(id);
}
@@ -75,7 +77,7 @@
{
if (!(id instanceof CacheKey))
{
- throw new IllegalArgumentException("cache.removeLock for
entity beans must have a CacheKey object as argument instead of " + id.getClass());
+ throw new IllegalArgumentException("cache.removeLock for
entity beans must have a CacheKey object as argument instead of " + id);
}
super.removeLock(id);
}