facebook

Q: Hibernate/WebService questionI want to be able to instant

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #266938 Reply

    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.

    How might this be accomplished?

    Thanks in advance!
    Adam

    #266942 Reply

    vgbpowertech
    Member

    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

    #267012 Reply

    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?

    Adam

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Q: Hibernate/WebService questionI want to be able to instant

You must be logged in to post in the forum log in