Fix ThreadAffinityClientConnectionFactory
`isSingleUse()` should return `false` by default - the whole point is
to bind a connection to a thread. The TACCF should have its own flag
not return the delegate's.
Also, the `TcpReceivingChannelAdapter` calls `closeConnection(connectionId)`.
This should be a no-op for the TACCF since the proper way to close a connection
is to call `releaseConnection()` on the thread to which the connection is bound.
**cherry-pick to 5.0.x**
(cherry picked from commit 753255c)
This commit is contained in:
committed by
Artem Bilan
parent
535c753db1
commit
6b8a005c92
@@ -298,21 +298,6 @@ public class ThreadAffinityClientConnectionFactory extends AbstractClientConnect
|
||||
this.connectionFactory.setMapper(mapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSingleUse() {
|
||||
return this.connectionFactory.isSingleUse();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSingleUse(boolean singleUse) {
|
||||
this.connectionFactory.setSingleUse(singleUse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLeaveOpen(boolean leaveOpen) {
|
||||
this.connectionFactory.setLeaveOpen(leaveOpen);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain interceptorFactoryChain) {
|
||||
this.connectionFactory.setInterceptorFactoryChain(interceptorFactoryChain);
|
||||
@@ -370,7 +355,7 @@ public class ThreadAffinityClientConnectionFactory extends AbstractClientConnect
|
||||
|
||||
@Override
|
||||
public boolean closeConnection(String connectionId) {
|
||||
return this.connectionFactory.closeConnection(connectionId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user