Re: Aspects in tapestry pages using spring

2007-01-29 Thread Denis McCarthy
Thanks for that James - using a filter is a better approach than aspectj in this instance. I'm not too hot on hivemind. Is there any service point or extension I can use to get the current page's name? I have a request filter for implementing the open session in view filter in hibernate already

Re: Aspects in tapestry pages using spring

2007-01-26 Thread James Carman
Well, it depends on your pointcut, I guess. If it can be woven into your code properly, you don't need to recompile Tapestry. However, you might want to look into putting an interceptor on the page service or introducing a web request servicer filter. That's an easy way to do cross-cutting conc

Re: Aspects in tapestry pages using spring

2007-01-26 Thread Denis McCarthy
Thanks for that James. I've got the aspectj stuff working now. The reason why I've been looking into aspectj is to log the length of time users of my site spend on individual pages. I want to log when each page is rendered for a particular user's session, giving me a record of how long a user s

Re: Aspects in tapestry pages using spring

2007-01-26 Thread James Carman
You can also use AspectJ within Tapestry using hivemind-aspectj (at JavaForge). You still have to make sure you weave the aspects into your code, but hivemind-aspectj can inject HiveMind services into your singleton (the default) AspectJ aspects. That way, you can inject all of Tapestry's HiveMi

Re: Aspects in tapestry pages using spring

2007-01-26 Thread Denis McCarthy
Thanks for that - I'm on the right track now. I'm now looking for a tapestry method to advise, one that invariably fires once and only per request. Is there such a method? Thanks Denis Ivano wrote: Once you have accomplished the task (a), the task (b) can be solved as follows. You need to de

Re: Aspects in tapestry pages using spring

2007-01-25 Thread Ivano
Once you have accomplished the task (a), the task (b) can be solved as follows. You need to define the aspect as a SpringBean (only in spring 2, of course) using something like: in your applicationContext.xml file. Then you need to weave your project classes with the aspect you m

Aspects in tapestry pages using spring

2007-01-25 Thread Denis McCarthy
Hi, I want to log the time users spend on individual pages in tapestry to a database. I'm thinking the best way to do this may be to define an aspect (using aspectj) on the attach() method for each page. I'm using spring for the business/dao layers. As the tapestry pages are not themselves def