I guess having each request wrapped in one transaction sounds sane and to answer your previous question the indices (changes to your IndexService) aren't really written until you call tx.finish(). So that's either a bug in the IndexService (btw which one do you use, LuceneIndexService or NeoIndexService?) or your transaction handling may be buggy, however your supplied example seems correct... we'll have to test that more.
2008/5/10 Philip Jägenstedt <[EMAIL PROTECTED]>: > On 5/10/08, Johan Svensson <[EMAIL PROTECTED]> wrote: > >> If tx.finish() is never called the transaction will never be committed >> or rolled back (holding locks/memory). > > I only have a single transaction wrapping everything I do for the > entire request. Not nice maybe, I'm trying to work out some better way > to split it. In any event, it is precisely on the form that you've > written here, but after the request fails once (due to > ServletException thrown when the MusicBrainz webservice is overloaded) > it seems that the indexes created in that very transaction block have > not been rolled back, because next time I run it seems like there's a > hit in the index, followed by a NotFoundException. I can reproduce > this seemingly reliably (well, it depends on the musicbrainz > webservice getting overloaded, but anyway) if I shut down tomcat, > remove my data store and run from scratch. > > In other words, the index seems to have been updated/not rolled back > even though I never called success(). > > Bug? > > Philip > >> When manually managing transactions always make use of a try finally block: > > Is there a non-manual way to handle transactions? Sounds comfortable... > > Philip > _______________________________________________ > Neo mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user >
_______________________________________________ Neo mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

