I tried to test your snapshot but I got some maven issues (can not automatically download snapshots by Nexus proxy because the file name is not in xxx-1.2-SNAPSHOT, have to download/copy/rename a bunch of files to my local repo). After one hour fight with maven dependency and class not found issues, I gave up and revert to 1.1.1.
Anyway I did read through your code SpringBeanRouter and SpringBeanFinder, it seems your solution is smarter than mine and SpringBeanFinder is totally not affected :-) I 99% believe your change should work. Once you guys release 1.2 officially I will switch to 1.2 asap. Thank you for your great work! Best Regards, Daniel > Hi Daniel, > > Thanks for sharing your experience and for the enhancement suggestion. > > I've just made the SpringBeanRouter implement ApplicationContextAware, using > the context received to instantiate the finders. Changes are checked in SVN > trunk. > > However, I'm not sure however about injecting the SpringBeanFinder because we > need one instance per target resource bean... > > Could you test the next snapshot and let me know if it work fine? > > Best regards, > Jérôme Louvel > -- > Restlet ~ Founder and Lead developer ~ http://www.restlet.org > Noelios Technologies ~ Co-founder ~ http://www.noelios.com > > > -----Message d'origine----- > De : Daniel Woo [mailto:daniely...@hotmail.com] > Envoyé : vendredi 9 janvier 2009 17:26 > À : discuss@restlet.tigris.org > Objet : *SPAM(1.8)* RE: Re: SpringBeanRouter issues > > one more thing, if you want to intercept MyResource.represent(Variant), that > won't work with Spring AOP (jdk proxy or cglib). Because this method is > called by Resource.handleGet() > > You have to intercept Resource.handleGet()/Put()/Post()/Delete(), or use > static waver like aspectJ. > > > I think you can make SpringBeanRouter implement ApplicationContextAware. I > > made it this way, the AOP interceptor successfully executed. > > > > I changed very little to your SpringBeanRouter and SpringBeanFinder: > > > > SpringBeanRouter: make it ApplicationContextAware, and holds an > > ApplicationContext. Each time createFinder() will pass that app context to > > SpringBeanFinder. > > > > SpringBeanFinder:now the constructor accepts an application context instead > > of a beanFactory. Moreover, you actually can also make the beanFinder > > ApplicationContextAware, in that way, you don't have to hard code "new > > SpringBeanFinder(appContext, beanName)" anymore, you can even inject > > SpringBeanFinder to SpringBeanRouter, hence the SpringBeanFinder can be > > replaced by subclass written by the end user. > > > > What do you think? It's at least useful to me because this solves my > > transaction and security issue with Spring. > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1014009 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1028724