0 Replies Latest reply on Feb 8, 2005 5:10 AM by jesper6tv

    Cache Invalidation with NoLock on read-only beans

    jesper6tv Newbie

      Im having some entity beans (CMP) that only change seldom and if, directly through database updates when JBoss is down. They are read-only beans, e.g. the countries in which a customer can live. The country entity then needs to be set on new orders with CMR.

      My problem is that e.g. a Country-bean gets locked when set on new orders via CMR, even with read-only methods and read-only bean and a SimpleReadWriteEJBLock for that matter.

      My solution would be to have a Cache Invalidation container with NoLock policy.

      The Instance Per Transaction container could also be used but would create to much load on the DB, due to loading the read-only beans all the time.

      Any comments?