git-svn-id: http://svn.research-infrastructures.eu/d4science/gcube/trunk/spatial-data/geonetwork@141786 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f58eb5f7d8
commit
b5aa06aa3e
|
@ -429,9 +429,11 @@ public class GeoNetwork implements GeoNetworkAdministration {
|
||||||
do{
|
do{
|
||||||
try{Thread.sleep(wait);}catch(InterruptedException e){}
|
try{Thread.sleep(wait);}catch(InterruptedException e){}
|
||||||
created=GroupUtils.getByName(getClient().getGroups(), name);
|
created=GroupUtils.getByName(getClient().getGroups(), name);
|
||||||
}while(created==null && (System.currentTimeMillis()-submitTime<=timeout));
|
}while(created==null && (System.currentTimeMillis()-submitTime>=timeout));
|
||||||
log.error("GN Update timeout {}ms reached. Group [ID : {}, name : {} ] not created.",timeout,id,name);
|
if(created==null) {
|
||||||
if(created==null) throw new GNServerException("Reached timeout while creating group with id "+id);
|
log.error("GN Update timeout {}ms reached. Group [ID : {}, name : {} ] not created.",timeout,id,name);
|
||||||
|
throw new GNServerException("Reached timeout while creating group with id "+id);
|
||||||
|
}
|
||||||
return created;
|
return created;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -489,9 +491,11 @@ public class GeoNetwork implements GeoNetworkAdministration {
|
||||||
do{
|
do{
|
||||||
try{Thread.sleep(wait);}catch(InterruptedException e){}
|
try{Thread.sleep(wait);}catch(InterruptedException e){}
|
||||||
created=UserUtils.getByName(getClient().getUsers(), username);
|
created=UserUtils.getByName(getClient().getUsers(), username);
|
||||||
}while(created==null && (System.currentTimeMillis()-submitTime<=timeout));
|
}while(created==null && (System.currentTimeMillis()-submitTime>=timeout));
|
||||||
log.error("GN Update timeout {}ms reached. User {} not created.",timeout,username);
|
if(created==null) {
|
||||||
if(created==null) throw new GNServerException("Reached timeout while creating user "+username);
|
log.error("GN Update timeout {}ms reached. User {} not created.",timeout,username);
|
||||||
|
throw new GNServerException("Reached timeout while creating user "+username);
|
||||||
|
}
|
||||||
return created;
|
return created;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue