I would like disable the autodetection and explicitly list my mapped entities in the Hibernate config file:
Code:
<class>xx.yyy.zzz.EntityClassA</class>
<class>xx.yyy.zzz.EntityClassB</class>
<class>xx.yyy.zzz.EntityClassC</class>
<class>xx.yyy.zzz.EntityClassD</class>
...
Instead of this on every startup:
Code:
2010-08-11 10:56:03,970 DEBUG Ejb3Configuration - Detect class: false; detect hbm: false
2010-08-11 10:56:03,986 DEBUG AbstractJarVisitor - Searching mapped entities in jar/par: file:/path/to/my/classes
2010-08-11 10:56:03,986 DEBUG AbstractJarVisitor - Filtering: xx.yyy.zzz.NotEnityClassA
2010-08-11 10:56:03,986 DEBUG AbstractJarVisitor - Filtering: xx.yyy.zzz.NotEnityClassB
2010-08-11 10:56:03,986 DEBUG AbstractJarVisitor - Filtering: xx.yyy.zzz.NotEnityClassC
2010-08-11 10:56:04,002 DEBUG AbstractJarVisitor - Filtering: xx.yyy.zzz.NotEnityClassD
...
I tried the setting
Code:
<property name="hibernate.archive.autodetection" value=""/>
But as you can see the autodetection still executes.
I also found the
hibernate.ejb.resource_scanner setting, but do I really need to create my own
DoNothingScanner to disable the autoscan???
Maybe someone can explain to me why the autodetection seems to be so important that it can't be disabled easily?