Using ConfigurableListableBeanFactory.getBeanDefinition(beanName).isAutowireCandidate();
Not sure if there's a "proper" way to obtain the ConfigurableListableBeanFactory from the ApplicationContext besides using instanceof tests. Philippe James Carman-3 wrote: > > How do you propose that we get at that information? I took a look > around, but didn't see anything like an isAutowireCandidate(String > beanName) method. > > On Thu, Jul 9, 2009 at 3:48 AM, Ben Hutchison<[email protected]> > wrote: >> Currently, when injecting Spring autowired dependencies via @SpringBean, >> Wicket's Spring integration does take account of the optional >> "autowire-candidate" attribute of a bean. This attribute tells spring not >> to >> consider a bean during autowiring. >> >> Here's our use case where we discovered this limitation. Our app uses 2 >> databases, a default database used by 95% of the code, and a reporting >> database used by the reports component. As a result we have 2 >> SessionFactories in our context, and this breaks @SpringBean injection. >> >> It would be nice to cater for the 95% of code that doesn't use the >> reporting >> database, and use explicit names only for the other 5%. This seems to >> require the Wicket-Spring integration to understand the >> "autowire-candidate=false" attribute. >> >> Regards >> Ben >> >> -- >> >> >> >> *Ben Hutchison >> Senior Developer >> * Level 2 476 St Kilda Road Melbourne VIC 3004 >> T 613 8807 5252 | F 613 8807 5203 | M 0423 879 534 | www.ibsglobalweb.com >> <http://www.ibsglobalweb.com/> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://www.nabble.com/Wicket%27s-%40SpringBean-and-the-%22autowire-candidate%22-annotation-tp24405708p24410492.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
