Removed service discovery to to old service class
This commit is contained in:
parent
73efe34e05
commit
f39a50e6fa
|
@ -74,25 +74,14 @@ public class GCatClientDiscovery {
|
||||||
|
|
||||||
protected static List<String> getAddresses(){
|
protected static List<String> getAddresses(){
|
||||||
List<String> addresses = new ArrayList<>();
|
List<String> addresses = new ArrayList<>();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SimpleQuery proxyQuery = queryForProxy(GCatConstants.SERVICE_CLASS);
|
SimpleQuery proxyQuery = queryForProxy(GCatConstants.SERVICE_CLASS);
|
||||||
addresses = ICFactory.client().submit(proxyQuery);
|
addresses = ICFactory.client().submit(proxyQuery);
|
||||||
if(addresses==null || addresses.isEmpty()){
|
|
||||||
proxyQuery = queryForProxy(GCatConstants.OLD_SERVICE_CLASS);
|
|
||||||
addresses = ICFactory.client().submit(proxyQuery);
|
|
||||||
if(addresses==null || addresses.isEmpty()){
|
|
||||||
throw new Exception("No ResourceRegistry Proxy Found");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.debug("{}. Looking for RunningInstance.", e.getMessage());
|
logger.debug("{}. Looking for RunningInstance.", e.getMessage());
|
||||||
SimpleQuery serviceQuery = queryForService(GCatConstants.SERVICE_CLASS);
|
SimpleQuery serviceQuery = queryForService(GCatConstants.SERVICE_CLASS);
|
||||||
addresses = ICFactory.client().submit(serviceQuery);
|
addresses = ICFactory.client().submit(serviceQuery);
|
||||||
if(addresses==null || addresses.isEmpty()){
|
|
||||||
serviceQuery = queryForService(GCatConstants.OLD_SERVICE_CLASS);
|
|
||||||
addresses = ICFactory.client().submit(serviceQuery);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return addresses;
|
return addresses;
|
||||||
}
|
}
|
||||||
|
@ -122,7 +111,7 @@ public class GCatClientDiscovery {
|
||||||
List<String> addresses = getAddresses();
|
List<String> addresses = getAddresses();
|
||||||
|
|
||||||
if(addresses==null || addresses.isEmpty()){
|
if(addresses==null || addresses.isEmpty()){
|
||||||
String error = String.format("No (%s or %s):%s found in the current context", GCatConstants.SERVICE_CLASS, GCatConstants.OLD_SERVICE_CLASS, GCatConstants.SERVICE_NAME);
|
String error = String.format("No %s:%s found in the current context", GCatConstants.SERVICE_CLASS, GCatConstants.SERVICE_NAME);
|
||||||
throw new RuntimeException(error);
|
throw new RuntimeException(error);
|
||||||
}
|
}
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
|
|
Loading…
Reference in New Issue