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=1013472

Reply via email to