Thursday, 26 April 2018

session-per-request in hibernate

The most common pattern in a multi-user client/server application is session-per-request. In this model, a request from the client is sent to the server, where the Hibernate persistence layer runs. A new Hibernate Session is opened, and all database operations are executed in this unit of work. On completion of the work, and once the response for the client has been prepared, the session is flushed and closed. Use a single database transaction to serve the clients request, starting and committing it when you open and close the Session. The relationship between the two is one-to-one and this model is a perfect fit for many applications.

No comments:

Post a Comment

session-per-request in hibernate

The most common pattern in a multi-user client/server application is session-per-request . In this model, a request from the client is sent...