There's the TopLevelTransaction#isMarkedAsSuccessful() method, but that's
protected. Maybe you need to wrap Transaction instances yourself and expose
such a method. Something like:
public class MyTransaction implements Transaction
{
private final Transaction tx;
private boolean success;
private MyTransaction( Transaction tx )
{
this.tx = tx;
}
public static MyTransaction beginTx( GraphDatabaseService db )
{
return new MyTransaction( db.beginTx() );
}
@Override
public void failure()
{
tx.failure();
}
@Override
public void success()
{
success = true;
tx.success();
}
@Override
public void finish()
{
tx.finish();
}
public boolean isMarkedAsSuccessful()
{
return success;
}
}
2011/6/28 Rick Bullotta <[email protected]>
> Is there an easy way to know if the transaction used in a call to finish()
> is in a "success" or "failure" state?
>
> _______________________________________________
> 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