Your Internet Explorer version is not compatible with our shopping cart system. Please use version 9 or higher to avoid problems with your order(s). Close
Q: Hibernate/WebService questionI want to be able to instant
I want to be able to instantiate a Hibernate sessionFactory (time consuming) then access a Hibernate Session using WebServices,
but not have to reinitialize the sessionFactory on each request.
I would use a servlet-filter or a servlet that loads on application start.
Because your Hibernate session(factory) is (hopefully) a singleton the initialization will only be done once.
servlet-filter: on first access
servlet: on startup
Thanks for your response. I’m attempting to use the MyEclipse WebService generator (XFire) and Hibernate and be able to
submit WS based queries at Hibernate, am I using the right mix of technologies?
It would appear that I may need to use the ServiceFactory http://xfire.codehaus.org/The+ServiceFactory methods to do
the XFire configuration from within a Servlet – does this sound reasonable?