I have used Javassist to create a class.
I have created my hibernate config for the class.
But I cannot see a way to to provide the Configuration class with both of these things.
If I use 'addClass' then it searches for the 'hbm.xml' in the classpath.
If I write my own classloader, and use addResource(String, ClassLoader), then it only loads the resource from the classsloader, and still attempts to load the class using Class.forName semantics.
What I really need is a way to tell Hibernate to use the same classloader for loading resources and classes.
Can I do this? Can anyone suggest another way?
I'm so close to being able to do exactly what I want!
|