native query bulk operation otuside transaction should unlock cache region
This commit is contained in:
parent
e30e4163c3
commit
de379ffd21
|
@ -163,7 +163,7 @@ public class BulkOperationCleanupAction implements Executable, Serializable {
|
|||
|
||||
public static void schedule(SharedSessionContractImplementor session, EntityPersister... affectedQueryables) {
|
||||
final BulkOperationCleanupAction action = new BulkOperationCleanupAction( session, affectedQueryables );
|
||||
if ( session.isEventSource() ) {
|
||||
if ( session.isEventSource() && session.isTransactionInProgress() ) {
|
||||
session.asEventSource().getActionQueue().addAction( action );
|
||||
}
|
||||
else {
|
||||
|
@ -173,7 +173,7 @@ public class BulkOperationCleanupAction implements Executable, Serializable {
|
|||
|
||||
public static void schedule(SharedSessionContractImplementor session, Set<String> affectedQueryables) {
|
||||
final BulkOperationCleanupAction action = new BulkOperationCleanupAction( session, affectedQueryables );
|
||||
if ( session.isEventSource() ) {
|
||||
if ( session.isEventSource() && session.isTransactionInProgress() ) {
|
||||
session.asEventSource().getActionQueue().addAction( action );
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue