-->
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.  [ 2 posts ] 
Author Message
 Post subject: 1st Level Cache problem
PostPosted: Wed Jan 25, 2012 10:31 am 
Newbie

Joined: Tue Dec 22, 2009 8:38 am
Posts: 18
Hi,

I am using only 1 nhibernate session in the application scope, and I load into its 1st level cache some objects.
The application performs various computations ... one of them lasts for about 10 minutes. When I wanted to retrieve the objects from the 1st level cache, I found out that they are not there anymore, the 1st level cache has expired them.

I need to know whether an object in the cache 1L can expire, and if so, how can this be undo (prohibit the objects in the cache 1L expire).

Thank you,
C.


Top
 Profile  
 
 Post subject: Re: 1st Level Cache problem
PostPosted: Mon Jan 30, 2012 11:20 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Objects do not expire in 1st level cache, only in 2nd level cache.
When objects in 1st level cache do dissappear, then probably because you have detached them previously from from persistent context (= 1st level cache). Objects get detached either when you call session.evict(object) or when you call session.clear()


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.