}
}
public void testRestartServer() throws Exception
{
JBossConnectionFactory cf2 = (JBossConnectionFactory) ic[1].lookup("/ConnectionFactory");
ClientClusteredConnectionFactoryDelegate clusterCF = (ClientClusteredConnectionFactoryDelegate)cf.getDelegate();
ClientConnectionFactoryDelegate delegates[] = clusterCF.getDelegates();
clusterCF.closeCallback();
ServerManagement.kill(1);
//Restart the server on the same place
ServiceAttributeOverrides attr = new ServiceAttributeOverrides();
attr.put(ServiceContainer.REMOTING_OBJECT_NAME, "LocatorURI",delegates[1].getServerLocatorURI());
ServerManagement.start(1,config,attr,false);
// The server back on the same remoting port as before
startDefaultServer(1, attr, false);
Connection conn = null;
try
{
conn = cf2.createConnection();
}
finally
{
try
{