hey ! here is my thoughts about your concerns :
a) controllers should be services that are bound to the registry in a ControllerModule class. b) persistence.xml file should probably be in your dao-hibernate module. You can configure where to find this file in a Module class. c) thiago already answer this one :D Cheers, Charles Le mer. 22 avr. 2015 à 16:43, Thiago H de Paula Figueiredo < thiag...@gmail.com> a écrit : > 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 > >