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