-
Bug
-
Resolution: Unresolved
-
Normal
-
CSB-4.10.3
-
None
-
False
-
-
False
-
-
Important
-
Very Likely
-
0
Here is the simplified version of
org.apache.camel.component.file.remote.RemoteFileProducer.preWriteCheck
@Override public void preWriteCheck(Exchange exchange) { boolean noop = false; if (loggedIn) { try { noop = getOperations().sendNoop(); } catch (Exception e) { noop = false; } } if (!noop) { connectIfNecessary(exchange); } }
The problem is, that the method connectIfNecessary checks the connection once again:
protected void connectIfNecessary(Exchange exchange) { if (!loggedIn || !getOperations().isConnected()) { RemoteFileConfiguration config = getEndpoint().getConfiguration(); loggedIn = getOperations().connect(config, exchange); } }
It is wrong! If Noop returns false, the connection recreation must be forced. The second check getOperations().isConnected() is much less strong and must be omitted.
I cause the system to remain the broken connection and reuse it again and again. It makes Retry-Configuration useless.
P.S. The class RemoteFileConsumer behaves correctly. It forces the connect, if Noop was not successful.
1.
|
Fix RemoteFileProduces ignores the result of Noop |
|
New | |
Unassigned |
2.
|
Validate RemoteFileProduces ignores the result of Noop |
|
New | |
Unassigned |