On Wed, 22 Apr 2015 10:53:01 -0300, Poggenpohl, Daniel
<daniel.poggenp...@isst.fraunhofer.de> wrote:
Hello,
Hi!
First, to be generic with my DAO interfaces, I can't use @CommitAfter on
them, because then I'd need a dependency to tapestry-jpa.
If you use 5.4-beta-22 or up, you don't need to put the annotation in the
interface anymore: you can put it on the service (in your case, DAO)
implementation. Problem solved! :D
If you're not using 5.4-beta-22 or up, you can come up with your own
annotation and adapt the tapestry-jpa class which does the service
decoration or advice, JpaTransactionAdvisor, then add this in module class:
@Match("*DAO")
public static void adviseTransactionally(
YourJpaTransactionAdvisor advisor,
MethodAdviceReceiver receiver) {
advisor.addTransactionCommitAdvice(receiver);
}
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org