openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean Andriamalala <jean_and...@hotmail.com>
Subject Using non persistent field with Kodo L2 Entity datacache
Date Fri, 02 Oct 2009 11:44:12 GMT

Hello All,
 
I configured an Entity cache (@DataCache) using OpenJpa and I would like to cache also a non
persistent field computed dynamically as the computation of this field is expensive. The scenario
is as following:
 
1. Entity is retrieved from db using a query
2. In PostLoad method, the non persistent field is computed
3. Entity is retrieved again using the same query
4. Persistent attributes are retrieved from the cache
5. However, the non persistent field is null and so it is computed again inPostLoad method
 
Is there a way to cache a non persistent field to avoid the computation? EJB 2.0 cache allows
this but I haven't figured out how to do this with Kodo Entity cache. 
 
Thanks,
 
Jean 		 	   		  
_________________________________________________________________
Show them the way! Add maps and directions to your party invites. 
http://www.microsoft.com/windows/windowslive/products/events.aspx
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message