OrientDB 1.7.9 branch:
I just tried the following and all database directories are created and the
queries come back correctly from each database.
@Test
public void test() {
List<OrientGraphNoTx> oGS = new LinkedList<>();
for (int i = 1; i <=4; i++) {
String url = "plocal:orientdb/db" + i;
OrientGraphFactory oGF = new OrientGraphFactory(url);
OrientGraphNoTx oG = oGF.getNoTx();
oG.addVertex(null, "url", url);
oGS.add(oG);
}
for (OrientGraphNoTx oG : oGS) {
Iterable<Vertex> vertices = oG.query().has("url",oG.getRawGraph
().getURL()).vertices();
Assert.assertTrue(vertices.iterator().hasNext());
Vertex next = vertices.iterator().next();
System.out.format("vertex : %s url:%s%n", next, next.getProperty
("url"));
}
}
On Monday, September 8, 2014 12:34:25 PM UTC-4, Curtis Stanford wrote:
>
> OK, perhaps I should first ask, has anyone been able to access multiple
> plocal instances from one JVM?
>
> On Friday, September 5, 2014 5:23:07 PM UTC-6, Curtis Stanford wrote:
>>
>> I'm trying to run one JVM instance with 4 embedded graph databases in
>> different directories. Is this possible in 1.7.8? I've tried creating the
>> OrientGraph instance directly and using the OrientGraphFactory but can't
>> get it to work. I've tried using the thread modes of MANUAL and
>> ALWAYS_AUTOSET with no luck.
>>
>> Each database has its own plocal url but every database I access always
>> seems to access the same database directory. The other 3 are not created or
>> accessed at all. I'm not trying to run an OServer at this point, just
>> trying to access local databases.
>>
>> Any hints appreciated.
>>
>> Curtis
>>
>>
--
---
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.