very minor code changes
This commit is contained in:
parent
05cf85b61a
commit
f7e3177dba
|
@ -461,10 +461,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont
|
|||
|
||||
@Override
|
||||
public void close() {
|
||||
if ( closed && !waitingForAutoClose ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !closed || waitingForAutoClose ) {
|
||||
try {
|
||||
delayedAfterCompletion();
|
||||
}
|
||||
|
@ -494,6 +491,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont
|
|||
setClosed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void setClosed() {
|
||||
closed = true;
|
||||
|
@ -553,10 +551,9 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont
|
|||
|
||||
@Override
|
||||
public boolean isTransactionInProgress() {
|
||||
if ( waitingForAutoClose ) {
|
||||
return factory.isOpen() && transactionCoordinator.isTransactionActive();
|
||||
}
|
||||
return !isClosed() && transactionCoordinator.isTransactionActive();
|
||||
return waitingForAutoClose
|
||||
? factory.isOpen() && transactionCoordinator.isTransactionActive()
|
||||
: !isClosed() && transactionCoordinator.isTransactionActive();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue