Frederic, I'm not an expert with the Tangosol plugin, but in general, the OpenJPA DataCache plugin is on a per-EntityManager basis. So, if configured, all Entities associated with a given PersistenceContext (EntityManager) could be cached. You then have the ability to designate certain Entities as being non-cached. Or, you could go in reverse and designate only those Entities that you do wish to cache.
If your question is more specific to the Tangosol plugin, then you'll have to ask the development team that developed that plugin. BEA? Tangosol? Not sure. The OpenJPA code only supports the DataCache plugin capabilities (and the built-in DataCache implementation). The other cache plugins (ie, Tangosol, ObjectGrid, etc) are supported by other development organizations. Thanks, Kevin On Thu, Mar 27, 2008 at 1:00 PM, <[EMAIL PROTECTED]> wrote: > > I need to have a specific tangosol cache per entity - (or at least per > group of entity): > > I am trying to use the annotation @DataCache to make this happen - > unfortunately it does not work. openjpa always uses the tangosol cache > define din the persistence xml file - basically the default cache. > > I tried to set the @DataCache annotation to: > @DataCache(enabled = true, name = > > "tangosol(TangosolCacheName=b,TangosolCacheType=named,ClearOnClose=false)", > timeout = -1) > > I also tried > @DataCache(enabled = true, name = "b", timeout = -1) > > But none format worked. Again - all entities are currently going to the > default Tangosol cache. > > It is a must for our project to be able to cache our entities in specific > cache (We are using Tangosol). Using one cache only for all entities in > the > system almost removes all the benefit of the cache all together - and we > might as well not have one. > > How can I accomplish that? > Should I implement our own RemoteCommitProvider? (This seems complicated > becuase I do not know all the internal of openjpa) > Can I use the entity callback method to talk to the cache myself? (This > seems easy) - but in order to use it I need to be sure all entity callback > methods will be called even when I save a top level object in the graph - > I > mean I need all the other entities related to the parent one to have teir > callback fired if they get saved too. > > Please help - this is a huge issue for us. > > Thank you, > > Frederic > > >
