Re: Live class reloading and annotations in page classes
Em Sat, 01 Aug 2009 05:23:16 -0300, Massimo Lusetti escreveu: That is what ChenilleKit access module is doing. Thanks Robert, Howard and Massimo! I used ComponentClassTransformWorker and it's simple and works like a charm! :) I love the sensation of having learned something new, simple and powerful in Tapestry. :) -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Live class reloading and annotations in page classes
On Fri, Jul 31, 2009 at 6:42 PM, Howard Lewis Ship wrote: > If you have a ComponentClassTransformWorker that converts the > annotation into meta-data on the ComponentModel, then you can just get > the correct ComponentModel without loading the page itself. That is what ChenilleKit access module is doing. Cheers -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Live class reloading and annotations in page classes
If you have a ComponentClassTransformWorker that converts the annotation into meta-data on the ComponentModel, then you can just get the correct ComponentModel without loading the page itself. On Thu, Jul 30, 2009 at 1:35 PM, Robert Zeigler wrote: > > On Jul 29, 2009, at 7/297:00 PM , Thiago H. de Paula Figueiredo wrote: > >> Hi! >> >> I'm working on a security package for Tapestry (to be open-sourced soon) >> and I'm following the typical Dispatcher-based approach. Now I need to check >> if the requested page has a given annotation and read its values. This >> already works. I also want my dispatcher to get the annotation presence and >> values when a page class is live reloaded. >> >> I'm using ComponentClassResolver to map page names (user/edit) to their >> page classes names, get the Class instance and then get the annotation >> values. But, without an application restart, my dispatcher doesn't see the >> new annotation values. I could use ComponentSource.getPage(), but it checks >> out a page instance from the pool and invokes Page.attached(). I suspect >> this hurt perfomance, as the page checkout would be too heavy to be executed >> twice per request (one in the security dispatcher, other to process the page >> render/event itself). >> >> Any suggestions? Am I right in the assumption that using >> PageCache.checkout() to do security checks would hurt performance? >> > > Well, if you use ComponentSource, it will take advantage of the > RequestPageCache, so you'll only checkout the page once per request. Given > that it's the page the user is requesting, it shouldn't really hit > performance any more than just returning the page to the user. If you use > the PagePool directly, you run the risk of checking out multiple copies of > the page per request, and that would definitely have an impact on > performance. > > > Robert > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Live class reloading and annotations in page classes
On Jul 29, 2009, at 7/297:00 PM , Thiago H. de Paula Figueiredo wrote: Hi! I'm working on a security package for Tapestry (to be open-sourced soon) and I'm following the typical Dispatcher-based approach. Now I need to check if the requested page has a given annotation and read its values. This already works. I also want my dispatcher to get the annotation presence and values when a page class is live reloaded. I'm using ComponentClassResolver to map page names (user/edit) to their page classes names, get the Class instance and then get the annotation values. But, without an application restart, my dispatcher doesn't see the new annotation values. I could use ComponentSource.getPage(), but it checks out a page instance from the pool and invokes Page.attached(). I suspect this hurt perfomance, as the page checkout would be too heavy to be executed twice per request (one in the security dispatcher, other to process the page render/event itself). Any suggestions? Am I right in the assumption that using PageCache.checkout() to do security checks would hurt performance? Well, if you use ComponentSource, it will take advantage of the RequestPageCache, so you'll only checkout the page once per request. Given that it's the page the user is requesting, it shouldn't really hit performance any more than just returning the page to the user. If you use the PagePool directly, you run the risk of checking out multiple copies of the page per request, and that would definitely have an impact on performance. Robert - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org