-->
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.  [ 1 post ] 
Author Message
 Post subject: problem with loading cached entrys
PostPosted: Tue Nov 20, 2012 9:24 am 
Newbie

Joined: Tue Nov 20, 2012 9:18 am
Posts: 1
Hi all,

I am having some trouble when loading entity's from the second level cache. My setup is as follows: I use Memcached as a second level cache provider for hibernate. For those of you that don't know memcached, it is a standalone caching server. The reason I use this is because the cache won't have to be recreated after a server restart.
When I use the application for the first time there are no troubles with this and everything works fine. If I shutdown my tomcat server and then reboot it, then there are problems with
reassembling entitys from the second level cache.

My guess is that the problem is caused because a new SessionFactory is created after rebooting my server, and the new session factory read the class properties in a different way. This explains why I get classCastExceptions from hibernate.

Now to get to my point, I wanted to know if there is a work around for this? Or is it impossible to do with a second level cache? Worst case scenario I have to evict my second level cache whenever the server restarts. But it would surprise me if the sessionfactory really reads in the properties in a random way.

Thank you for any help,
Bas


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

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.