for an application I'm writing, it would be useful to extend the functionalities of the Session interface via inheritance, with a class that either "implements Session" or "extends SessionImpl".
Unfortunately, if I'm not mistaken, the Configuration class is hardwired to return an instance of SessionFactoryImpl, which is hardwired to return an instance of SessionImpl, so I cannot get a different class unless I subclass Configuration (overriding the buildSessionFactory method), SessionFactoryImpl _and_ SessionImpl.
This does not seem an elegant solution to me, so I'm wondering whether it wouldn't be better to either turn SessionFactory into an abstract factory, or at least give the option to specify the actual Session class in Hibernate's properties and instantiate it via reflection (not very elegant either, but maybe simpler).
What do you think?
Ugo
-- Ugo Cei - Consorzio di Bioingegneria e Informatica Medica P.le Volontari del Sangue, 2 - 27100 Pavia - Italy Phone: +39.0382.525100 - E-mail: [EMAIL PROTECTED]
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel