Ok, I know know the memory leak isnt because of the org.hibernate.impl.SessionFactoryImpl.
When hibernate run hql statements for some reason it tries to load a class for every where statement , and that class gets into jboss class loader black list (that has no limit for some reason).
Example:
int userId = 4; String hql = "select from user where user.id = " + userId + " and user.type = 'admin'";
When hibernate will run this hql, it will try to load these classes and will fail (it is caught internally and handled, happens in WhereParser.doToken(line 412)) "4.class", "'admin'.class" and "and.class". This will lead for jboss to black list these classes (in a hashSet).
This process leads over time to a big memory leak.
Is there a way to make hibernate stop doing this class loading?
thanks, Ran.
|