Hibernate version: 3.1.1
The generate() method of the IdentifierGenerator interface has the following signature:
Code:
public Serializable generate(SessionImplementor session, Object object)
throws HibernateException;
Is the SessionImplementor that is passed to this method the same Session that is used to insert a new entity / row into the table ? In other words, assuming I don't commit or rollback in my implementation of IdentifierGenerator, is it executing in the same database transaction that will be used for the actual insert into the table ?
Furthermore, is there one instance of IdentifierGenerator created per JVM per entity that uses the same implementation of IdentifierGenerator ?