add try catch in order to manage a close failure
This commit is contained in:
parent
261dbbe278
commit
1b5d41b22f
|
@ -345,7 +345,11 @@ public class StorageIDResolver {
|
||||||
else {
|
else {
|
||||||
if(!Objects.isNull(storageManagerClient)) {
|
if(!Objects.isNull(storageManagerClient)) {
|
||||||
LOG.debug("going to close an old storage-client instance");
|
LOG.debug("going to close an old storage-client instance");
|
||||||
|
try {
|
||||||
storageManagerClient.forceClose();
|
storageManagerClient.forceClose();
|
||||||
|
}catch(Exception e) {
|
||||||
|
LOG.warn("Some problem occurred during the close operation:"+e.getMessage()+" Going to open another connection");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
LOG.debug("initializing a new storage-client instance");
|
LOG.debug("initializing a new storage-client instance");
|
||||||
storageManagerClient=new StorageClient(StorageIDResolver.class.getName(), StorageIDResolver.class.getSimpleName(), STORAGEID_RESOLVER, STORAGE_ACCESS_TYPE, memory, STORAGE_BACKEND_TYPE).getClient();
|
storageManagerClient=new StorageClient(StorageIDResolver.class.getName(), StorageIDResolver.class.getSimpleName(), STORAGEID_RESOLVER, STORAGE_ACCESS_TYPE, memory, STORAGE_BACKEND_TYPE).getClient();
|
||||||
|
|
Loading…
Reference in New Issue