This closes #103 fixes

This commit is contained in:
Clebert Suconic 2015-08-03 08:24:28 -04:00
commit d9ba65c01c
7 changed files with 28 additions and 8 deletions

View File

@ -155,7 +155,6 @@ public class ClusterConnectionBridge extends BridgeImpl
if (factory == null) if (factory == null)
{ {
ActiveMQServerLogger.LOGGER.nodeNotAvailable(targetNodeID);
return null; return null;
} }
factory.setReconnectAttempts(0); factory.setReconnectAttempts(0);

View File

@ -97,7 +97,8 @@ public class ColocatedFailoverScaleDownExample
// Step 7. Crash server #0, the live server, and wait a little while to make sure // Step 7. Crash server #0, the live server, and wait a little while to make sure
// it has really crashed // it has really crashed
ServerUtil.killServer(server0); ServerUtil.killServer(server0);
Thread.sleep(5000); System.out.println("Waiting for scale-down to complete...");
Thread.sleep(10000);
// Step 8. start the connection ready to receive messages // Step 8. start the connection ready to receive messages
connection1.start(); connection1.start();

View File

@ -97,6 +97,7 @@ public class ColocatedFailoverExample
// Step 7. Crash server #0, the live server, and wait a little while to make sure // Step 7. Crash server #0, the live server, and wait a little while to make sure
// it has really crashed // it has really crashed
ServerUtil.killServer(server0); ServerUtil.killServer(server0);
Thread.sleep(10000);
// Step 8. start the connection ready to receive messages // Step 8. start the connection ready to receive messages
connection.start(); connection.start();

View File

@ -89,7 +89,9 @@ under the License.
<master> <master>
<failover-on-shutdown>true</failover-on-shutdown> <failover-on-shutdown>true</failover-on-shutdown>
</master> </master>
<slave/> <slave>
<failover-on-shutdown>true</failover-on-shutdown>
</slave>
</colocated> </colocated>
</shared-store> </shared-store>
</ha-policy> </ha-policy>

View File

@ -86,8 +86,12 @@ under the License.
<backup-request-retry-interval>2000</backup-request-retry-interval> <backup-request-retry-interval>2000</backup-request-retry-interval>
<max-backups>1</max-backups> <max-backups>1</max-backups>
<request-backup>true</request-backup> <request-backup>true</request-backup>
<master/> <master>
<slave/> <failover-on-shutdown>true</failover-on-shutdown>
</master>
<slave>
<failover-on-shutdown>true</failover-on-shutdown>
</slave>
</colocated> </colocated>
</shared-store> </shared-store>
</ha-policy> </ha-policy>

View File

@ -94,13 +94,20 @@ public class CoreMessagingProxy
ClientMessage m = session.createMessage(false); ClientMessage m = session.createMessage(false);
ManagementHelper.putOperationInvocation(m, resourceName, operationName, args); ManagementHelper.putOperationInvocation(m, resourceName, operationName, args);
ClientMessage reply = requestor.request(m); ClientMessage reply = requestor.request(m);
if (ManagementHelper.hasOperationSucceeded(reply)) if (reply != null)
{ {
return ManagementHelper.getResult(reply); if (ManagementHelper.hasOperationSucceeded(reply))
{
return ManagementHelper.getResult(reply);
}
else
{
throw new Exception((String) ManagementHelper.getResult(reply));
}
} }
else else
{ {
throw new Exception((String)ManagementHelper.getResult(reply)); return null;
} }
} }

View File

@ -111,6 +111,12 @@ public class MQTTTestSupport extends ActiveMQTestBase
@After @After
public void tearDown() throws Exception public void tearDown() throws Exception
{ {
System.clearProperty("javax.net.ssl.trustStore");
System.clearProperty("javax.net.ssl.trustStorePassword");
System.clearProperty("javax.net.ssl.trustStoreType");
System.clearProperty("javax.net.ssl.keyStore");
System.clearProperty("javax.net.ssl.keyStorePassword");
System.clearProperty("javax.net.ssl.keyStoreType");
stopBroker(); stopBroker();
} }