Hi, I just started porting my app in orient and some things that were 
working need some debugging, I am a bit lost in this one.

So I have a singleton :

public class OrientDatabase implements IGraphDatabase {

    private static OrientGraphFactory factory;
    private static OrientDatabase instance;
    private static String configuration;


    public static void setConf(String conf) {
        configuration=conf;
    }
    public OrientGraphFactory getFactory() {
        return factory;
    }

    public OrientDatabase(String conf) {
        factory=new OrientGraphFactory(conf);
    }

    public static OrientDatabase getInstance() {
        if (instance==null) {
            return new OrientDatabase(configuration);
        }
        else {
            return instance;
        }
    }

    @Override
    public TransactionalGraph getGraph() {
        return this.getFactory().getTx();
    }
}


then at the start of the Jersey thread :

TransactionalGraph g= GraphDatabaseFactory.getGraphDatabase().getGraph();


I am doing an integration test which does the following: I have a user with 
two friends (with edges). I delete one of them. I readd him. I get the 
friends list. 
these three actions are three different threads but are run sequentially.

now the following code :

Iterator<Vertex> vertexIterator= vuser.getVertices(Direction.BOTH, 
GraphHelper.EDGE_TYPE_FRIENDSHIP).iterator();


contains 1 entry. Select * from friends shows two edges to the correct 
friends.

from the gremlin console: g.V("username","arisalexis").both("Friendship")

I get shown both friends.

In the end of my functions I always have:

} catch (Exception e) {
    g.rollback();
    throw e;
} finally {
    g.commit();
}


any ideas?

windows 7, java 8,orient 2.0.2

-- 

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