Added logs
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@134330 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fb98a6e857
commit
6dff36cb0c
|
@ -427,6 +427,7 @@ public class EntityManagementImpl implements EntityManagement {
|
||||||
return vertex;
|
return vertex;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
logger.error("Error Creating {} with {}", entityType, jsonRepresentation, e);
|
||||||
if (orientGraph != null) {
|
if (orientGraph != null) {
|
||||||
orientGraph.rollback();
|
orientGraph.rollback();
|
||||||
}
|
}
|
||||||
|
@ -446,6 +447,9 @@ public class EntityManagementImpl implements EntityManagement {
|
||||||
String jsonProperties)
|
String jsonProperties)
|
||||||
throws FacetNotFoundException, ResourceNotFoundException,
|
throws FacetNotFoundException, ResourceNotFoundException,
|
||||||
ResourceRegistryException {
|
ResourceRegistryException {
|
||||||
|
|
||||||
|
logger.trace("Trying to create {} with {}", relationType, jsonProperties);
|
||||||
|
|
||||||
OrientGraph orientGraph = null;
|
OrientGraph orientGraph = null;
|
||||||
|
|
||||||
if (relationType == null || relationType.compareTo("") == 0) {
|
if (relationType == null || relationType.compareTo("") == 0) {
|
||||||
|
@ -485,6 +489,7 @@ public class EntityManagementImpl implements EntityManagement {
|
||||||
relationType, relationBaseClass, edgeProperties, false);
|
relationType, relationBaseClass, edgeProperties, false);
|
||||||
|
|
||||||
} catch(ResourceNotFoundException rnfe){
|
} catch(ResourceNotFoundException rnfe){
|
||||||
|
logger.trace("Error Creating {} with {}", relationType, jsonProperties, rnfe);
|
||||||
throw rnfe;
|
throw rnfe;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ResourceRegistryException(e);
|
throw new ResourceRegistryException(e);
|
||||||
|
@ -498,6 +503,7 @@ public class EntityManagementImpl implements EntityManagement {
|
||||||
Map<String, Object> edgeProperties,
|
Map<String, Object> edgeProperties,
|
||||||
boolean deferredCommit) throws ResourceRegistryException {
|
boolean deferredCommit) throws ResourceRegistryException {
|
||||||
|
|
||||||
|
logger.info("Trying to create {} with {}", relationType, edgeProperties);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
@ -541,14 +547,19 @@ public class EntityManagementImpl implements EntityManagement {
|
||||||
if (!deferredCommit) {
|
if (!deferredCommit) {
|
||||||
orientGraph.commit();
|
orientGraph.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.info("{} with {} successfully created", relationType, edgeProperties);
|
||||||
|
|
||||||
return edge;
|
return edge;
|
||||||
|
|
||||||
} catch (ResourceRegistryException rre) {
|
} catch (ResourceRegistryException rre) {
|
||||||
|
logger.error("Error Creating {} with {}", relationType, edgeProperties, rre);
|
||||||
if (orientGraph!=null) {
|
if (orientGraph!=null) {
|
||||||
orientGraph.rollback();
|
orientGraph.rollback();
|
||||||
}
|
}
|
||||||
throw rre;
|
throw rre;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
logger.error("Error Creating {} with {}", relationType, edgeProperties, e);
|
||||||
if (orientGraph!=null) {
|
if (orientGraph!=null) {
|
||||||
orientGraph.rollback();
|
orientGraph.rollback();
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue