Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.2.1
-
Fix Version/s: 1.3
-
Labels:None
-
Number of attachments :
Description
There is a subtle race condition in JMSClientInterceptor:
ResultJoinHandler handler = createResultJoinHandler(methodInvocation, metadata);
// send request to topic
requestor.request(destination, requestMessage, handler, getMultipleResponseTimeout());
// race to here if the response comes back fast
RemoteInvocationResult result = handler.waitForResult();
return recreateRemoteInvocationResult(result);
due to a bug in the ResultJoinHandler methods:
public RemoteInvocationResult waitForResult() {
while (true) {
synchronized (lock) {
if (result != null)
If the onMessage result could have been already called before we call waitForResult and so result could be != null but the unblockCallerThread could still return false.
I've attached a patch which fixes the problem. Few of the unit tests work for me because of outside dependencies so I'm not sure how to best test this issue.
Issue Links
- relates to
-
LINGO-33
Multiple response timeout doesn't work
-
Activity
| Attachment | ResultJoinHandler.java.diff [ 23675 ] |
| Attachment | lingo.patch [ 23676 ] |
| Fix Version/s | 1.3 [ 12843 ] | |
| Resolution | Fixed [ 1 ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Attachment | lingo.patch [ 23686 ] |
I suspect that my patch may fix
LINGO-33as well.