Ugo Cei wrote:
[I'm reposting this message since it didn't get any attention the first time I did (more than 2 months ago). Maybe people were too busy at the moment, or maybe this issue is not that interesting, in which case please excuse me.]
Hi,
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
------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel