HHH-8680 Relax synchronized block in TableGenerator#generate

(cherry picked from commit adbd987fff7bb3a00a5b407741fd8a4270763f19)

Conflicts:

	hibernate-core/src/main/java/org/hibernate/id/enhanced/NoopOptimizer.java
This commit is contained in:
Sanne Grinovero 2013-11-13 14:10:37 +00:00 committed by Steve Ebersole
parent 184c257f1d
commit 1fd8f420e4
2 changed files with 4 additions and 1 deletions

View File

@ -44,6 +44,9 @@ public interface Optimizer {
/**
* Generate an identifier value accounting for this specific optimization.
*
* All known implementors are synchronized. Consider carefully if a new
* implementation could drop this requirement.
*
* @param callback Callback to access the underlying value source.
* @return The generated identifier value.
*/

View File

@ -463,7 +463,7 @@ public class TableGenerator implements PersistentIdentifierGenerator, Configurab
}
@Override
public synchronized Serializable generate(final SessionImplementor session, Object obj) {
public Serializable generate(final SessionImplementor session, final Object obj) {
final SqlStatementLogger statementLogger = session.getFactory().getServiceRegistry()
.getService( JdbcServices.class )
.getSqlStatementLogger();