Hi, I have a question about transaction within web application.
For a web application using JSF, EJB(JBOSS) and hibernate, what do I need to do to make all DB access for one HTTP request/response within one transaction?
I have some session beans that are injected with EnttityManager. For every HTTP request, two or more session beans will be involved to access DB through Hibernate. I want to make all the session bean methods calls belong to one transaction for every HTTP request.
Do I need to make all the session beans stateful? If I make session beans stateful and keep their references in HTTP session, will Hibernate session be open across http requests? will DB connection be open across Http requests? What is the transaction boundary in this case?