Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting hibernate session in Struts2 (Urgent)

 
sam raghav
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I am new to Struts2, I am generating hibernate sessionFactory and hibernate Session implementing Filter.

Now DAO needs hibernate session object to access database. But I don't know how to get it?

Please help.

Thanks and regards.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See EaseUp.

This isn't really a Struts-related question if you're just asking how to get Hibernate sessions/session factories. There are several ways to go about it; the ORM forum might be a more appropriate place to ask.

If you're using Spring then the DAOs can be injected with session factories essentially automatically.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic