Hi everbody;
Hi; how we can update one document and one graph db in an atomic operation.
Db instances for graph and document databases are different so I try to use
nested transaction but I failed. Is there any way to create atomic
operation it includes update for document and graph databases. Following
code segment just commits graphDb not documentDb. How can commit graphDb
and documentDb in same transaction or in same thread.
Best Regards.
try{
documentDb = new
ODatabaseDocumentTx("remote:localhost/TestDocumentDb").open("root",
"Kaos8619");
OrientGraphFactory factory = new
OrientGraphFactory("remote:localhost/GratefulDeadConcerts","root","Kaos8619").setupPool(1,10);
db = factory.getTx();
documentDb.getTransaction().begin();
ODocument doc = new ODocument("Person");
doc.field( "name", "Burhan" );
doc.field( "surname", "Skywalker" );
doc.field("age",33);
doc.save();
documentDb.commit();
db.addVertex("class:Person", "name", "Burhan", "age", 33,
"city", "Rome", "born", "Victoria, TX");
db.commit();
}finally {
db.shutdown();
documentDb.close();
}
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.