Re: Does "persist" mean *commit* ??



On 31 juil, 08:09, Sébastien de Mapias <sglrig...@xxxxxxxxx> wrote:
Hi,
Sorry to get back with my question... But nothing's
clear in these answers I got. The 1rst line of R. Green's
page states that "writing Java objects to disk in a way that
they can be read back in again later".

If HibernateTemplate's 'save' means "persist", i.e. write objects
to disk, then 'save' means 'commit' am I right ?

No, you're not. It seems to me that you're trying to understand the
meaning of a specific term in the javadoc of a specific method of a
specific class: HibernateTemplate.
HibernateTemplate, as its name and doc indicates, is a utility class
provided by the Spring to help with using Hibernate, a complex Object-
Relational Mapper (ORM), in Spring-based applications. Try first to
read about Hibernate, what it is, what it does and how it works,
before trying to use it with HibernateTemplate:
http://www.hibernate.org/hib_docs/reference/en/html/ (or
http://www.hibernate.org/hib_docs/reference/fr/html/ if, as I suspect,
you prefer reading in French). Then you will understand what a Session
is, how it's related to a transaction, what persistent and transient
objects are in this context, what persist means, and when a commit is
performed.

JB.


Thanks.
SR

.