[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-814) Cached queries cannot be cleared from SessionFactoryImpl.softQueryCache field

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Mar 21 13:00:41 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-814.
------------------------------


Closing stale resolved issues

> Cached queries cannot be cleared from SessionFactoryImpl.softQueryCache field
> -----------------------------------------------------------------------------
>
>                 Key: HHH-814
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-814
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>         Environment: Hibernate 2.1, 3.0. Oracle database.
>            Reporter: Peter Severin
>
> 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 in a web container). 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 the application reload hibernate will continue creating instances of the holder class that was 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list