Jul 5th, 2009, 09:07 AM
spring osgi with aspectj dependency injection on prototype
I was experimenting with springweaver and I think I have run into a problem when using spring's AnnotationBeanConfigurerAspect from multiple bundles.
I will try to describe the environment and the issue:
- it's an eclipse RCP application that uses spring framework and spring DM
- we use equinox aspects with aspectj ITD to extend our prototype beans (eclipse views, composites, etc) with PropertyChangeSupport (nice thing to have .. all we have to do is mark some class as @Bindable) and it works fine
- we use equinox aspects and LTW
- we've started using spring @Configurable and @Autowired in order to mark some objects as spring configurable and it works like a charm if everything is declared in a single bundle under the same context
- if I introduce another bundle that has it's own spring context and if I try to instantiate an object marked as @Configurable everything seems to work fine if it uses the same spring beans defined in a previously instantiated context. If it references a bean declared in a newly created context AnnotationBeanConfigurerAspect doesn't inject it. It seems to me that since it's a singleton aspect beanfactory gets replaced each time setBeanFactory is called.
I was browsing JIRA and found following issues:
Did spring dm server solve these issues? Can someone point me in the right direction?
Thank you in advance!
Last edited by iloncar; Jul 6th, 2009 at 05:41 AM.