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


Reply via email to