Hi all,

i've developed a Neo4j and Google Web toolkit based application. It runs
well on jetty. Now, i try to run it on tomcat 7.  I use Eclipse to create
GWT, then convert it to Dynamic Web Project to run on Tomcat by following
the suggestion at
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/39e0ff6325e4d504/55bfd342d77ec910?pli=1
I also copy neo4j jars files to war lib, and build path with them.
Everything is running well, except for it does not create the "var/graph"
directory like it does on Jetty.
i run the following code to create the database. I'd really appreciate any
suggestions from you all?
==========

GraphDatabaseService graphDb = new EmbeddedGraphDatabase( "var/graphdb" );

String result="";

Transaction tx = graphDb.beginTx();

Node first = graphDb.createNode();

try

{

 Index<Node> persons = graphDb.index().forNodes( "friends" );

 Node firstNode = graphDb.createNode();

Node secondNode = graphDb.createNode();

Relationship relationship = firstNode.createRelationshipTo( secondNode,
MyRelationshipTypes.KNOWS );

relationship.setProperty( "message", "brave Neo4j " );

firstNode.setProperty( "message", "Hello" );

secondNode.setProperty( "message", "world!" );

persons.add( firstNode, "message", firstNode.getProperty( "message" ) );

persons.add( secondNode, "message", secondNode.getProperty( "message" ) );



 result=result+firstNode.getProperty("message");

result=result+secondNode.getProperty("message");

result=result+relationship.getProperty("message");

 System.out.println("Name : "+result);

    tx.success();

}

finally

{

   tx.finish();

   graphDb.shutdown();

}

=================

Regards,


Bryan.
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to