-->
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: Cached queries in SessionFactoryImpl.softQueryCache
PostPosted: Mon Aug 01, 2005 11:36 am 
Newbie

Joined: Wed Oct 01, 2003 5:29 am
Posts: 4
Hi,

Our application is deployed a little bit differently than usual. Hibernate is loaded and initialized by the main container classloader and the actual application is loaded by a child classloader (like a web application). The problem arises when the application is reloaded by discarding the child classloader and creating another one.

The problem is that when using scalar queries with a holder class (select new MyClass), after a reload hibernate will create instances of the holder class loaded using the old classloader. It seems that Hibernate actually holds a reference to this class somewhere. I did some research in the source code and it seems that the queries(QueryTranslator having the field holderClass) are stored in the private softQueryCache field of the SessionFactoryImpl which is never cleared and there is no publicly accessible methods that would allow this.

I would like the confirmation that the problem is really there. I've tried the method SessionFactory.evictQueries(), but it seems to clear something else. If the problem does exist when I will create a JIRA bug that hopefully will be fixed in the next version.


Thanks,

Peter.


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.