Thanks Igor, I think i understand it now. Basically every function which is annotated with @CommitAfter will be commited at the end of the request when session is detached. I guess the only way is to group together whatever i wanted to achieve into a single function and have it @CommitAfter.
Igor Drobiazko wrote: > > @CommitAfter commits the transaction of the request. The transaction is > created when the session is attached to the request. When functionB() is > called the transaction will be committed and a new one will be created. So > functionA() will commit the later transaction. > > On Tue, May 26, 2009 at 5:46 AM, sodium <sodiu...@yahoo.com> wrote: > >> >> A quick question about tapestry-hibernate rollback propagation. As far as >> i >> know, any function annotated with @CommitAfter will create a new >> transaction >> similar to EJB required_new. But how would the nested functions behave? >> >> For eg. >> >> @CommitAfter >> public void functionA() { >> functionB(); >> } >> >> @CommitAfter >> public void functionB() {} >> >> >> If functionB failed to commit: >> 1) Will functionA be rollback? >> 2) Or will functionA be commited under another new transaction regardless >> of >> functionB? >> >> >> -- >> View this message in context: >> http://www.nabble.com/%40CommitAfter-rollback-propagation-tp23716428p23716428.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > > -- > Best regards, > > Igor Drobiazko > > -- View this message in context: http://www.nabble.com/%40CommitAfter-rollback-propagation-tp23716428p23718188.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org