Hi,
I am implementing an application which is using an embedded OrientDB.
Based on our requirement, each project in my application has its own folder
(with its own local OrientDB database). Inside of app, we allow user to
switch to different project. I tried the following code
Folder structure
project1/orientdb_data
project2/orientdb_data
In code,
public static OrientGraphFactory getFactory(String projectPath) {
if (factory == null)
factory = new OrientGraphFactory("plocal:" +
projectPath);
return factory;
}
public static void switchProject(String projectPath) {
if (factory != null) {
factory.close();
factory = null;
}
}
Please do not worry about thread safe issue, I already took care of it in
the actual code. The problem here is if factory is initialized to use
"project1/orientdb_data", later on I created a new OrientGraphFactory with
"project1/orientdb_data". There is no error reported, but
OrientGraphFactory is still using "project1/orientdb_data". I am on
OrientDB 2.2.beta
Thanks.
--
---
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.