Skip to content

Commit

Permalink
[EAPSUP-802] RemoteTransaction: don't create transaction handles when…
Browse files Browse the repository at this point in the history
… transaction is already located
  • Loading branch information
tadamski committed Apr 5, 2022
1 parent e2579f7 commit 971a27d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@ public void setLocation(URI location) throws IllegalArgumentException, IllegalSt
} catch (GeneralSecurityException e) {
throw new IllegalArgumentException(e);
}
final SimpleTransactionControl control = provider.getPeerHandle(location, sslContext, authenticationConfiguration).begin(getEstimatedRemainingTime());
final SimpleTransactionControl control;
if(stateRef.get() instanceof Located) {
control = null;
} else {
control = provider.getPeerHandle(location, sslContext, authenticationConfiguration).begin(getEstimatedRemainingTime());
}
try {
stateRef.get().join(stateRef, location, control);
} catch (Throwable t) {
Expand Down

0 comments on commit 971a27d

Please # to comment.