Trying to use Spring with Struts and Hibernate. I have a struts project that uses Hibernate, and I am trying to use Spring for resource configuration (and using HibernateTemplate)
if I subclass HibernateDaoSupport and try to get hibernate template and pass it a session object, it throws a null pointer exception.
the only way I have found to get this done is make my own Dao that has a Static Session Factory. otherwise i get a new instance of a DAO, and its SessionFactory is null.
(Spring does init it at startup, but doesn't do every instance).
what am i doing wrong?
any hints?
thanks,
-F
|