On 18 janv. 2011, at 12:08, Galder Zamarreño wrote:
See below:
On Jan 17, 2011, at 2:21 PM, Emmanuel Bernard wrote:
>
> On 17 janv. 2011, at 11:39, Galder Zamarreño wrote:
>
>> Emmanuel, good stuff on getting this done.
>
> Thanks for the feedback, see below.
>
>>
>> Looking at the code, it seems like all entities are stored within the same
Infinispan Cache instance called "ENTITIES". In the second level cache we
separate each entities 2LC cache into a separate cache instance? I think the latter would
make it easier to support situations where certain entities are deployed in classloader
isolation and some others are not, and might make it easier to define eviction/expiry
settings on a per entity type.
>
> Can you detail what's the classloader isolation issue is about? FYI, I only store
"primitive types" just like a database would do. I don't store any high
level type.
Right, I see. I'd love to see what the Infinispan cache contains when running your
unit tests, is there any easy way to do that from the unit tests? I think this would be
handy both from a debugging perspective.
In debugger mode, the SessionFactory contains a SessionFActoryObserver which contains the
cache. But yes, some kind of easier access to the cache would be nice.
>
> And for the current goal, eviction policy would be tragic, we would lose data :)
True, but even when memory is large, people might want to configure Infinispan with a
cache store to keep memory usage under control? I mean, if your DB runs out of space, the
DB data is still there, you can't put more data in it. However, if Infinspan runs out
of memory, data is gone unless there's other nodes in the cluster. Use of a cache
store is not maybe a good idea, but we shouldn't rule out clients doing this.
Right. And you think different passivation policies / cache store per entity is better
than one?
I was going for simplicity so far. also beyond entities, we have collection data
(associations) and indexed data.
> But I agree, when we will target the Grid + JPA we might need some custom eviction
policy per entity type though I wonder how we will be able to address query in this case.
> I'll add a todo.
What do you mean by addressing query? How querying will work with eviction on?
yes but I see now that you were thinking about passivating the data no simply evicting
it.
>
>>
>> I cloned the code last week but cannot find OgmcollectionPersister.class ??
>
> It's on the OGM branch
> git checkout ogm
>
https://github.com/emmanuelbernard/hibernate-core-ogm/blob/ogm/ogm/src/ma...
Read again, I'm talking about OgmcollectionPersister.class, not
OgmEntityPersister.java. OgmcollectionPersister.class comes from the wiki.
oops it's OgmCollectionPersister.class, I've fixed the wiki.
https://github.com/emmanuelbernard/hibernate-core-ogm/blob/ogm/ogm/src/ma...