Yes, I am very open to this; not only for instantiation, but
also for *proxy* instantiation. My motivation for this is
integration with AOP frameworks.

How I propose to do this is to add some more methods to
Interceptor in Hibernate2. (It is currently possible by
extending EntityPersister, but that is Bad.)

So we would add

Object Interceptor.instantiate(Class clazz);

and

Object Interceptor.instantiateProxy(Class clazz, Serializable id,
SessionImplementor s);

or something like that.....


>Just a quick query: as I understand it, each Object that uses Hibernate
>or persistence needs to have a concrete class with an empty
>constructor. How hard would it be to modify Hibernate to call a method
>on a factory class instead of "new"? And how hard would it be to be
>able to pass a reference to this factory class to hibernate, to allow
>for non-static methods?

>I ask because I tend to persist objects that act (at their most basic)
>as strongly typed Maps. These can be created on the fly using dynamic
>proxies from a basic interface. The rest should follow from there.





-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to