开发者

What's the default hibernate session control behavior in spring?

I have a 3 layer application using spring and hibernate (controller -> service -> dao) and transaction is applied to service layer. I don't configure OpenSess开发者_C百科ionInViewInterceptor or OpenSessionInViewFilter and I want to know the hibernate session control behavior. Open session per transaction or per request? Thanks!


If you're using the HibernateTransactionManager, a Session will get bound to the current thread and flushed and closed when the transaction ends, either through commit or roll back.

See also

  • 10. Transaction management
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜