Wednesday, June 23, 2010

Bit #20 - Overriding beforeCommit() to execute custom code before commit

Override the Application Module beforeCommit() method in your custom Application Module implementation class to execute any custom code that depends on data already posted to the database. Such code may include - but not limited to - validations done in the database via a stored procedure for example. The framework calls this method after doDML() which means that posted data are available but not yet committed.


// in your Application Module Implementation class

public void beforeCommit(TransactionEvent transactionEvent) {

        // call some stored procedure here



Application Module Implementation Class

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...