Reading the javadoc: "Invoked after the transaction has been rolled back if committing the transaction failed for some reason."
so it wont be notified about transactions that never even start to commit. That's why you don't get any notifications about such transactions. Is there any specific reason as to why you'd like to know about those transactions? 2011/6/24 Balazs E. Pataki <pat...@dsd.sztaki.hu> > Hi, > > I'm using 1.4M03 and I have class implementing TransactionEventHandler. > However it never receives an afterRollback() although I call failure() > and finish() on the transaction. Otherwise the transaction seems to be > rolled back, only my TransactionEventHandler is not informed about it. > beforeCommit() and afterCommit() are received all right. > > I tracked it down to > > TransactionEventsSyncHook#afterCompletion() > > public void afterCompletion( int status ) > { > if ( status == Status.STATUS_COMMITTED ) > { > for ( HandlerAndState state : this.states ) > { > state.handler.afterCommit( this.transactionData, > state.state ); > } > } > else if ( status == Status.STATUS_ROLLEDBACK ) > { > if ( this.states == null ) > { > // This means that the transaction was never successful > return; > } > > for ( HandlerAndState state : this.states ) > { > state.handler.afterRollback( this.transactionData, > state.state ); > } > } > else > { > throw new RuntimeException( "Unknown status " + status ); > } > } > > There's a "This means that the transaction was never successful" part, > and this where my code gets and hence afterRollback() is not called on > my handler. > > Could there be any reason for this? > > Thanks, > --- > balazs > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user