mirror of https://github.com/apache/activemq.git
- Added a message to the request map in failover before sending it to prevent race condition where the response tries (and fails) to remove the message before it is even added. This is to prevent double sending a message because it is still in the requestMap. (This is for the master-slave test cases)
- Enabled a QueueBridgeTest, this test seems to pass already. - Some minor typo correction. git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@376206 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1a3021beac
commit
e99fc62e4a
|
@ -339,14 +339,13 @@
|
|||
<exclude>**/TcpTransportBrokerTest.*</exclude>
|
||||
<exclude>**/activeio/*</exclude>
|
||||
|
||||
<!-- These are performance tests so take too long to run -->
|
||||
<!-- These are performance tests so take too long to run -->
|
||||
<exclude>**/perf/*</exclude>
|
||||
|
||||
<!-- This test currently fails -->
|
||||
<exclude>**/ItStillMarshallsTheSameTest.*</exclude>
|
||||
<exclude>**/QueueBridgeTest.*</exclude>
|
||||
|
||||
<!-- https://jira.logicblaze.com/jira/browse/AMQ-502 -->
|
||||
<!-- https://jira.logicblaze.com/jira/browse/AMQ-502 -->
|
||||
<exclude>**/StompTest.*</exclude>
|
||||
|
||||
<!-- http://jira.activemq.org/jira/browse/AMQ-522 -->
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ConnectionFailedException extends JMSException {
|
|||
}
|
||||
|
||||
public ConnectionFailedException() {
|
||||
super("The JMS connection has failed due ti a Transport problem");
|
||||
super("The JMS connection has failed due to a Transport problem");
|
||||
}
|
||||
|
||||
static private String extractMessage(IOException cause) {
|
||||
|
|
|
@ -319,9 +319,6 @@ public class FailoverTransport implements CompositeTransport {
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Send the message.
|
||||
connectedTransport.oneway(command);
|
||||
|
||||
// If it was a request and it was not being tracked by
|
||||
// the state tracker,
|
||||
|
@ -330,6 +327,20 @@ public class FailoverTransport implements CompositeTransport {
|
|||
if (!stateTracker.track(command) && command.isResponseRequired()) {
|
||||
requestMap.put(new Short(command.getCommandId()), command);
|
||||
}
|
||||
|
||||
// Send the message.
|
||||
try {
|
||||
connectedTransport.oneway(command);
|
||||
} catch (IOException e) {
|
||||
// If there is an IOException in the send, remove the command from the requestMap
|
||||
if (!stateTracker.track(command) && command.isResponseRequired()) {
|
||||
requestMap.remove(new Short(command.getCommandId()), command);
|
||||
}
|
||||
|
||||
// Rethrow the exception so it will handled by the outer catch
|
||||
throw e;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue