A typical lifecycle of a Hibernate object in a web app - ?
Posted
by EugeneP
on Stack Overflow
See other posts from Stack Overflow
or by EugeneP
Published on 2010-03-17T10:20:18Z
Indexed on
2010/03/17
10:51 UTC
Read the original article
Hit count: 131
Describe please a typical lifecycle of a Hibernate object (that maps to a db table) in a web app. Suppose, you create a new instance of an object and persist in the db. But during the app lifetime you'll be working on a detached object and finally you need to update it in the database, for example on exit. How does it look like with hibernate and spring?
p.s. Can transactions and sessions live between servlet transitions? So that we opened 1 session and use it in all servlets without a need to reopen it?
© Stack Overflow or respective owner