Hi

I'm trying to connect to two different databases at the same time. My goal 
is to copy records (both vertices and edges) from one database (db1) and 
insert it into the other database (db2). I will only be reading from db1 
and only writing to db2.
The db1 is running on a remote server which I'm sshing into, thus port 
2425. The db2 is running locally on my machine

ODatabaseDocumentTx db1 = new 
ODatabaseDocumentTx("remote:localhost:2425/db1).open("login", "cred");
ODatabaseDocumentTx db2 = new 
ODatabaseDocumentTx("remote:localhost:2424/db2).open("login", "cred");

I do various queries to the dbs, I'm only using SQL:

db1 -> List<ODocument> oDocs = db1.command(new 
OSQLSynchQuery(q_read)).execute();
db2 -> db2.command(new OCommandSQL(q_insert)).execute();

For most parts this works fine but for some records it seems like they are 
read from db2 instead of db1. So my theory is that somehow the databases 
are not safe to use in a scenario like this. 
I've found this wiki page. 
http://orientdb.com/docs/2.0/orientdb.wiki/Java-Multi-Threading.html
But I'm afraid I'm very new to threads and the wiki doesn't really seem to 
cover my usage.

So my questions are:
1. Are the databases safe to use in a scenario like mine?
2. If not, could they cause problems like records not being read from the 
correct db?
3. How do I solve a problem like this?

-- 

--- 
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.

Reply via email to