Closing factory before creating a new one
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@167105 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b95374b6c0
commit
de6d9eeccc
|
@ -514,6 +514,7 @@ public class SecurityContext {
|
|||
OrientGraphFactory factory = getFactory(permissionMode, false);
|
||||
OrientGraph orientGraph = factory.getTx();
|
||||
if(orientGraph.isClosed()) {
|
||||
factory.close();
|
||||
factory = getFactory(permissionMode, true);
|
||||
orientGraph = factory.getTx();
|
||||
}
|
||||
|
@ -524,6 +525,7 @@ public class SecurityContext {
|
|||
OrientGraphFactory factory = getFactory(permissionMode, false);
|
||||
OrientGraphNoTx orientGraphNoTx = factory.getNoTx();
|
||||
if(orientGraphNoTx.isClosed()) {
|
||||
factory.close();
|
||||
factory = getFactory(permissionMode, true);
|
||||
orientGraphNoTx = factory.getNoTx();
|
||||
}
|
||||
|
@ -534,6 +536,7 @@ public class SecurityContext {
|
|||
OrientGraphFactory factory = getFactory(permissionMode, false);
|
||||
ODatabaseDocumentTx databaseDocumentTx = factory.getDatabase();
|
||||
if(databaseDocumentTx.isClosed()) {
|
||||
factory.close();
|
||||
factory = getFactory(permissionMode, true);
|
||||
databaseDocumentTx = factory.getDatabase();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue