EAServer 5.x query caching settings are not automatically migrated to EAServer 6.0. If query caching in EAServer 5.x is detected, a warning message is printed in the deployment and migration logs, similar to:
2006-06-02 07:55:51.803 WARN main [EjbCompiler] query findByPrimaryKey in EJB BusinessStatus used Query Caching in 5.x, manual migration is required to setup Query Caching for this Query in 6.0.
You must manually set these three attributes for the queryMethod in the ejbjar-config file to enable query caching:
cacheSize – the maximum number of query results that will be held in cache. Each query result may consist of zero or more database rows. To avoid overflow, rows are removed from cache using a least recently used (LRU) discard strategy.
cacheTimeout – the maximum number of seconds that a result stored in cache is considered valid. Do not use this property to attempt to control the cache size, because invalid rows are discarded from cache when an attempt is made to access them.
isolationLevel – a logical isolation level for this query. A logical isolation level is distinct from the SQL isolation level that is applied to any JDBC database connections that are participating in the transaction. Typically, the SQL isolation level is ReadCommitted, and for some entity classes or query methods a higher isolation level is requested. Use one of the *_WITH_CACHE isolation levels.
For more information, see the QueryMethodProperty class documentation, which is available from the Web Management Console at http://hostname:8000/javadocs/public/index.html. Where hostname is the name of the host on which your EAServer 6.0 installation resides.
EAServer 5.x supports named caches, while EAServer 6.0
does not. In EAServer 6.0, you must specify the cache properties
for each query.