Does anyone know a way to intercept a Hibernate call to instantiate the class specified in the .hbm.xml file? I need a way to use the special ClassLoader class to provide an instance. I don't want to change the class loading for Hibernate at all, just an instance of the POJO mapped class.
<hibernate-mapping>
<class name="com.foo.Bar" table="Bar">
In the above code example, when Hibernate wants to create an instance of Bar , I need to provide this class with non-standard code instead of relying on the default loading behavior of the class.
Thanks in advance for your understanding,
saethi
source
share