I have following code.
String orientDBPath = "memory:visdb";
ODatabaseObjectPool objectPool;
OrientDBConfig dbConfig = OrientDBConfig.defaultConfig();
objectPool = new ODatabaseObjectPool(orientDBPath, username, password, dbConfig);
When I'm acquiring ODatabaseObject with objectPool.acquire(), I receive following ODatabaseException.
Caused by: com.orientechnologies.orient.core.exception.ODatabaseException: OrientDB instanced created without physical path, only memory databases are allowed
DB name="visdb"
at com.orientechnologies.orient.core.db.OrientDBEmbedded.buildName(OrientDBEmbedded.java:186)
at com.orientechnologies.orient.core.db.OrientDBEmbedded.getOrInitStorage(OrientDBEmbedded.java:173)
at com.orientechnologies.orient.core.db.OrientDBEmbedded.poolOpen(OrientDBEmbedded.java:159)
at com.orientechnologies.orient.core.db.ODatabasePoolImpl$1.createNewResource(ODatabasePoolImpl.java:40)
at com.orientechnologies.orient.core.db.ODatabasePoolImpl$1.createNewResource(ODatabasePoolImpl.java:37)
at com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:95)
at com.orientechnologies.orient.core.db.ODatabasePoolImpl.acquire(ODatabasePoolImpl.java:59)
at com.orientechnologies.orient.core.db.ODatabasePool.acquire(ODatabasePool.java:132)
at com.orientechnologies.orient.object.db.ODatabaseObjectPool.acquire(ODatabaseObjectPool.java:40)
What is the correct way to initialize ODatabaseObjectPool and ODatabasePool for memory DB?
I found another solution which worked for me.