Polish contribution
See gh-31531
This commit is contained in:
@@ -625,7 +625,7 @@ public class SingleConnectionFactory implements ConnectionFactory, QueueConnecti
|
||||
else {
|
||||
throw new jakarta.jms.IllegalStateException(
|
||||
"setClientID call not supported on proxy for shared Connection. " +
|
||||
"Set the 'clientId' property on the SingleConnectionFactory instead.");
|
||||
"Set the 'clientId' property on the SingleConnectionFactory instead.");
|
||||
}
|
||||
}
|
||||
case "setExceptionListener" -> {
|
||||
@@ -647,9 +647,9 @@ public class SingleConnectionFactory implements ConnectionFactory, QueueConnecti
|
||||
else {
|
||||
throw new jakarta.jms.IllegalStateException(
|
||||
"setExceptionListener call not supported on proxy for shared Connection. " +
|
||||
"Set the 'exceptionListener' property on the SingleConnectionFactory instead. " +
|
||||
"Alternatively, activate SingleConnectionFactory's 'reconnectOnException' feature, " +
|
||||
"which will allow for registering further ExceptionListeners to the recovery chain.");
|
||||
"Set the 'exceptionListener' property on the SingleConnectionFactory instead. " +
|
||||
"Alternatively, activate SingleConnectionFactory's 'reconnectOnException' feature, " +
|
||||
"which will allow for registering further ExceptionListeners to the recovery chain.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,21 +332,21 @@ public class TransactionAwareConnectionFactoryProxy
|
||||
// Invocation on SessionProxy interface coming in...
|
||||
|
||||
return switch (method.getName()) {
|
||||
// Only consider equal when proxies are identical.
|
||||
case "equals" -> (proxy == args[0]);
|
||||
// Only consider equal when proxies are identical.
|
||||
// Use hashCode of Connection proxy.
|
||||
case "hashCode" -> System.identityHashCode(proxy);
|
||||
// Use hashCode of Connection proxy.
|
||||
case "commit" ->
|
||||
throw new TransactionInProgressException("Commit call not allowed within a managed transaction");
|
||||
case "rollback" ->
|
||||
throw new TransactionInProgressException("Rollback call not allowed within a managed transaction");
|
||||
// Handle close method: not to be closed within a transaction.
|
||||
case "close" -> null;
|
||||
// Handle close method: not to be closed within a transaction.
|
||||
// Handle getTargetSession method: return underlying Session.
|
||||
case "getTargetSession" -> this.target;
|
||||
// Handle getTargetSession method: return underlying Session.
|
||||
default -> {
|
||||
// Invoke method on target Session.
|
||||
try {
|
||||
// Invoke method on target Session.
|
||||
yield method.invoke(this.target, args);
|
||||
}
|
||||
catch (InvocationTargetException ex) {
|
||||
|
||||
Reference in New Issue
Block a user