OK. I searched and see that we don't need to use HibernateTemplate
(
Spring HibernateTemplates or Not).
In any case, I'd like to be able to call sessionFactory.getCurrentSession().update(myObject) where the object returned by getCurrentSession() is a StatelessSessionImpl that implements the Session interface. So, I believe I still need to make a class that implements Session ("StatelessSessionAdapter") and also subclass SessionFactoryImpl and override the getCurrentSession() method.
Any reason not to do this? Other than the fact using StatelessSession is questionable, but because of the nature of this legacy re-development, we think this makes sense in this case.
I am curious why the Hibernate developers didn't do this to start with considering that they did provide the StatelessSession. However, the DAO code has to change to use it. I think the choice of stateless or regular Session implementations should be configurable.
Nathan