Back Forum Reply New

Dynamic Bean discovery in Spring 2.0.x

I want to find a solution for this, although I don't know if it's possible:

I want to inject beans following a certain naming convention, say quot;*Facadequot; or quot;*Servicequot; in one particular bean. For instance, I have a BusinessFacade bean that need to inject a considerable amount of *Service beans. Leaving aside the fact that it's tiresome to inject a lot of beans into one, there is another issue concerning the distribution of beans in several xml files, which are not all accesible to all programmers, only to the ones that are responsible for the beans that reside in each xml file. So in the xml that contains the BusinessFacade no programmer can inject their Service beans, and the fastest solution would be letting each programmer declaring a Service bean in his/her own xml and then the application finds all beans and injects them into the Facade.

How can I accomplish this without listeners or scanning the whole context. Some AOP, perhaps?

It's something like autowiring, but controlled by a naming convention in the beans to be injected and the beans to inject
¥
Back Forum Reply New