I'd like to dynamically wrap my persistent classes using CGLIB or JDK1.3 proxies to provide things like getters for metadata which aren't in the compiled class file. I've done some searching and it appears that all of the persistent classes are loaded by Hibernate using
cirrus.hibernate.helpers.ReflectHelper.classForName(String) which is implemented as: public static Class classForName(String name) throws ClassNotFoundException { try { return Thread.currentThread().getContextClassLoader().loadClass(name); } catch (Exception e) { return Class.forName(name); } } One option would be to try to set the current context class loader before Hibernate starts loading classes. But that is error-prone, I think. Another way would be to add a method to set the classloader to use. But really I'd just prefer a simple callback interface: public interface HibernateClassLoader { public Class loadClass(String name) throws ClassNotFoundException; } I guess the loader would be configurable per-datastore? If there's a better way, let me know. Thanks, Chris ------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel