Erik Hatcher wrote:
Why do not push this responsibility down to DAO layer wrapper?
My most recent struggle is with integrating auto-commit (via Cayenne) for all of my listener methods without them having to explicitly have a Cayenne dependence and mandating that they individually call the Cayenne commit API. IM'ing with Howard a bit, he gave me some tips on how to hook listener methods. I opted for the simplest one, by overriding getListeners() and creating custom IActionListener's around the ones provided by Tapestry itself. This worked great, until I hit a page that throws a RedirectException. So now I have to code in the catching of (Page)RedirectException and re-throw it. I don't think it is right to use exceptions for flow control.
I think that my trick: CGLib proxy for DAO classes, would do exactly what you are trying to accomplish, and will do that absolutely transparently
http://kgionline.com/articles/aop_1/aop1.jsp
Another example of real use: http://kgionline.com/xflow2/doc/xflow2/code_tricks.html
Ant by the way the same trick could be done with HiveMind - I tried and it works.
-- Thanks,
Konstantin Ignatyev
http://www.kgionline.com
PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2.700 tons of CFCs to the stratosphere, and increase their population by 263.000
Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
