-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Object Session Cache
PostPosted: Fri Jul 29, 2005 10:54 am 
Beginner
Beginner

Joined: Tue May 17, 2005 11:42 am
Posts: 22
What would i have to do to implement a Second Level Cache that handles instances instead of the object's internal state.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 29, 2005 6:00 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
I believe this won't work in general because of concurrency issues, that's why it isn't done. Immutable objects could be cached this way, but it seems that nobody wanted to do it, and I don't know how much NH code would have to be changed to implement this.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 01, 2005 9:40 am 
Beginner
Beginner

Joined: Tue May 17, 2005 11:42 am
Posts: 22
Thank you for the reply and advice Sergey, but I really need to implement this kind of cache, because I need to handle the same instance.
What I still need to know is which classes should I extend, or which interfaces need to be implemented to get the desired result.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 01, 2005 10:11 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
Customizing a project like NHibernate can cost you a lot in the long term...

If you need the cache for a specific case, can you create a "fake" cache that you feed and check manually?

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 01, 2005 5:19 pm 
Beginner
Beginner

Joined: Tue May 17, 2005 11:42 am
Posts: 22
Analysing the framework, I understand that is's possible to implement ICache
or to use the current HashtableCache that supports an object instance as a value.
But SessionImpl uses an internal class CacheEntry. here is where i loose hope because
this class limits itself to keep the internal's object state. (object[] state)
As far as i can see, whether I try to extend the framework or use the standard
ISession implementation, the last will allways transform the instance to it's internal
state.
I would like to know if my observations on this subject are correct.
Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 09, 2005 11:25 am 
Beginner
Beginner

Joined: Tue May 17, 2005 11:42 am
Posts: 22
Am my observations correct?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.