[Neo] TranactionUtil into API?

Peter Neubauer peter.neubauer at jayway.se
Thu Jun 21 08:28:19 CEST 2007


Oki,
will use that instead, tx for the hint!

/peter

On 6/21/07, Emil Eifrem <emil at neopersistence.com> wrote:
> On 6/20/07, Peter Neubauer <peter.neubauer at jayway.se> wrote:
> > Hi folks,
> > currently, TransactionUtils is in ....impl.transaction, implying that
> > it shouldn't be exported by e.g. a bundle for use with other clients.
> > However, in order to efficiently use the API it is very nice to use
> > this class, so I would suggest to move it into core.api or rename the
> > util.transaction package to something being part of the API.
>
> Well, you have org.neo4j.api.core.Transaction, which is a lot better
> than the old TransactionUtil. See the javadocs at:
>
>    http://api.neo4j.org/1.0-b5/org/neo4j/api/core/Transaction.html
>
> >From the javadocs:
>
> --- >8 ---
> Here's the idiomatic use of transactions in Neo:
>
>  Transaction tx = Transaction.begin();
>  try
>  {
>         ... // any operation that works with the node space
>         tx.success();
>  }
>  finally
>  {
>         tx.finish();
>  }
> --- >8 ---
>
> Lemme know if there's something about TransactionUtil that you prefer!
>
> Cheers,
>
> --
> Emil Eifrém, CEO [emil at neopersistence.com]
> Neo Persistence AB, www.neopersistence.com
> Cell: +46 733 462 271 | US Cell: 206 403 8808
> _______________________________________________
> Neo mailing list
> User at lists.neo4j.org
> http://lists.neo4j.org/mailman/listinfo/user
>
>


More information about the User mailing list