0 Replies Latest reply on Apr 29, 2005 11:55 AM by jason1

    cache-policy required for COMMIT C

      Hi!,

      I am implementing a read-mostly pattern as described in the JBoss clustering doc that has a clustered entity bean w/ Commit option C (e.g., Instance Per Transaction CMP 2.x EntityBean) and the another entity-bean on the same table deployed as ReadOnly.

      I made the two changes to the Instance Per Transaction CMP 2.x EntityBean container config as described in the docs:

      <interceptor>
      org.jboss.cache.invalidation.triggers.EntityBeanCacheBatchInvalidatorInterceptor
      </interceptor>


      <instance-cache>
      org.jboss.ejb.plugins.InvalidableEntityInstanceCache
      </instance-cache>


      However, when deploying, JBoss DD validation says "expected one cache-policy...".

      I got the entity bean to deploy by adding this:
      ...
      <cache-policy>
      org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy
      </cache-policy>
      ...
      


      However, this doesn't make sense since Commit option C never caches. Anyway, my question is two-fold:
      1. Is it OK to deploy an Instance Per Transaction CMP 2.x EntityBean with a LRU cache policy?
      2. If not, is there an 'no-cache' CachePolicy implementation much like the NoLock lock-plicy that I could configure to get past the DD validation?

      tia,
      Jason