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:
parent
184c257f1d
commit
1fd8f420e4
|
@ -44,6 +44,9 @@ public interface Optimizer {
|
||||||
/**
|
/**
|
||||||
* Generate an identifier value accounting for this specific optimization.
|
* 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.
|
* @param callback Callback to access the underlying value source.
|
||||||
* @return The generated identifier value.
|
* @return The generated identifier value.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -463,7 +463,7 @@ public class TableGenerator implements PersistentIdentifierGenerator, Configurab
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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()
|
final SqlStatementLogger statementLogger = session.getFactory().getServiceRegistry()
|
||||||
.getService( JdbcServices.class )
|
.getService( JdbcServices.class )
|
||||||
.getSqlStatementLogger();
|
.getSqlStatementLogger();
|
||||||
|
|
Loading…
Reference in New Issue