I agree that startup/shutdown database in session lifecycle is not a good
idea. It'll cost more time during the startup/shutdown and will slow down
your application if you have a huge number of sessions.


On Sat, Jul 2, 2011 at 23:10, Mattias Persson <[email protected]>wrote:

> Everything written to the database with successful transactions is
> persisted
> and will be accessible in any following sessions. Just _don't_ think of a
> GraphDatabaseService instance as a short lived object (like a SQL
> connection), but instead see it more as your database server which benefits
> from being long lived... even days, weeks...)
>
> 2011/7/1 Vaccaro, Kristen M <[email protected]>
>
> > Hi, I have a question about sessions in Neo4j. I'm working with the
> > embedded Java (not as a server) and I can load my data and query it
> between
> > transactions without trouble. My question is whether/how it's possible to
> > shut down my database at the end of a session and then access it in a new
> > session later.
> >
> > Something like first doing:
> > GraphDatabaseService graphDb = new EmbeddedGraphDatabase( "var/test/base"
> > );
> > ...Add all my data using transactions
> > graphDb.shutdown();
> >
> > Then later opening a new session and accessing that database and indices
> > I've already made. Is that possible (I didn't see anything covering that
> in
> > the wiki/documentation)? Or will I need to convert to the server version?
> > Kristen
> >
> > _______________________________________________
> > Neo4j mailing list
> > [email protected]
> > https://lists.neo4j.org/mailman/listinfo/user
> >
>
>
>
> --
> Mattias Persson, [[email protected]]
> Hacker, Neo Technology
> www.neotechnology.com
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to