No, it's a bit more complex (and easier at the same time) than this. There is a page on the Wiki named "Session and Transaction scope". Read that first and then the relevant parts of the Hibernate documentation. If that doesn't help you and you still don't feel comfortable with Session, Transaction, and the JDBC connections, consider reading Hibernate in Action.
There is no "easy" answer to that, unless you are happy with "it depends".
_________________ JAVA PERSISTENCE WITH HIBERNATE http://jpwh.org Get the book, training, and consulting for your Hibernate team.
|