[hibernate-dev] Memory consumption

Andrej Golovnin golovnin at gmx.net
Sat May 12 09:50:33 EDT 2012


Hi Hardy,

> Right, in this case validation mode NONE is the determining factor. I would think you get the same result w/ Validator 4.2.0.

Nope, it was the Validator 4.3.0. 

>  application or as part of the container startup?
> And what exactly do you mean w/ Hibernate Validator gets loaded? Do you just see the ValidatorFactory or are there other instances from the org.hibernate.validator.

Right after startup of the application server I see instances from the
org.hibernate.validator package (see 
http://www.flickr.com/photos/78207256@N07/7177561006/in/photostream).
Some time later they are garbage collected. 
SerializableValidatorFactory remains in memory and consumes ca 256KB.

There is also either AuditConfiguration or AuditEntitiesConfiguration
(don't remember now) which consumes ca. 2.5MB.

As I already wrote we don't use Envers and we don't use Validator.
None of our classes has Validator related annotations
So why they are loaded at all? I have tried to exclude this modules
in jboss-deployment-structure.xml by adding following exclusions:

       <exclusions>
         <module name="org.hibernate.validator"/>
         <module name="org.hibernate.envers"/>
       </exclusions>

But it does not seem to work.

Best regards,
Andrej Golovnin


More information about the hibernate-dev mailing list