[Hibernate-devel] Futur enhancement of the cache / Stat

2002-07-26 Thread Christian Meunier



In the futur, it might be a good idea to be able 
to get some stats about caches via the api.
 
The APi could list all regions used by hibernate 
and for each region give some basic stats about its usage ( Name of the region / 
attributes of the region / effectivness / nbr hit / nbr miss )
 
Best regards
Christian Meunier


RE: [Hibernate-devel] JCS integration

2002-07-26 Thread Gavin_King/Cirrus%CIRRUS

>Is a JCS cache serializable?  If so, how much more would it take to
>pass the whole session over the wire?

I've no idea if its serializable, probably not, but that doesn't affect
serializability of the Session. This is the factory-level cache using
JCS, not the Session's own collection of loaded objects.

Sessions are already serializable when disconnected and may be passed
on the wire. What exactly did you have in mind?

(well, they are serializable if the persistent object are serializable...)



---
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
___
Hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel



Re: [Hibernate-devel] Re: JCS integration

2002-07-26 Thread Gavin_King/Cirrus%CIRRUS

>Found 2 issues with the current cache code:
>
>one with the  tag, i edited vertex.hbm.xml to do my testing.
>If i place the  tag just after the  one it "works" , no
>error while parsing the xml
>If i place the  tag after  and before  , got
>an error parsing the xml:

This is intended. I decided it was too easy to miss the  tag
where it is now.

>Other error comes from the fact the class CacheEntry does not implement
>Serializable, it's mandatory that class going to the cache are
serializable.
>quick fix : ClassPersister.java line 1035

Done. Thanks for that. I had been testing against the in-memory cache only.

>- I thought the key was a composite one ( tableName + PK ), it appears
>it's only the PK ( if we want to be able to share a region cache among
> multiple classes we need a unique key)

Currently the factory-level caches hold instances of just a single class,
hence we don't need to use the tablename. If theres a really good reason
why we might want to keep all cached data in a single JCS region, we can
actually implement that directly in cirrus.hibernate.JCSCache, since it
knows the name of the rootclass it is caching. Actually thst such a small
amount of work I might just _do_it_

Is there any really major advantage to keeping everything in one region?

>- Then i try to re enter the show command, i would expect to get some
"Cache
>hit: xxx" debug info , but i get none.Are we sure that Hibernate does
check
>the cache properly ?

yup, I'm quite sure. But show can't utilize the cache because it uses
find() queries. The query goes to the database and retrieves the whole
object in one step. If you want to see some cache hits try an iterate()
query, or something with associations when use_outer_join is disabled.
or various other situations where the cache *is* used.

P.S. We really need to implement caching for collections if we want to
use this stuff most efficiently. I don't think theres anything
particularly technically difficult about that ... I just need to *do*
it. If anyone else wants to volunteer for this, give me a yell and
I'll tell you what needs to be done



---
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
___
Hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel