Hi,

I am running the latest 2.1-rc4 embedded server with the following config


public static OServer oServer;

public static void createServer() {
try {
oServer = OServerMain.create();
oServer.startup(OrientDBUtil.class.getClassLoader().getResourceAsStream("orientdb-server-config.xml"));
oServer.activate();
}
catch (Exception e) {
e.printStackTrace();
}
}


"orientdb-server-config.xml"


<storages>
<storage name="messaging" path="memory:/messaging" userName="aris" 
userPassword="xxx" loaded-at-startup="true" />
<storage name="exchange" path="memory:/exchange" userName="aris" 
userPassword="xxx" loaded-at-startup="true" />
</storages>


(do I need to declare here what kind of database they are? first is 
document and second is graph.


then I am using a singleton to get the instances from the pool


public OrientDatabase(String url) {

graphFactory=new OrientGraphFactory(url+"/exchange",user,password);
pool=new OPartitionedDatabasePool(url+"/messaging",user,password);

}


public ODatabaseDocumentTx getDocumentDb() {

return pool.acquire();
}

public TransactionalGraph getGraph() {

return this.getGraphFactory().getTx();
}



When I am running from the test:


documentDatabase=OrientDatabase.getInstance().getDocumentDb();
documentDatabase.begin();
documentDatabase.command(new OCommandSQL("delete from Chat")).execute();


then I get:


java.lang.IllegalStateException: Current database instance 
(com.orientechnologies.orient.core.db.OPartitionedDatabasePool$DatabaseDocumentTxPolled@9accff0)
 
is not active on current thread (Thread[main,5,main]). Current active 
database is: 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx@52559a69 
at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.checkIfActive(ODatabaseDocumentTx.java:3093)



is it maybe because it is embedded on the same jvm and in-memory?

-- 

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