darabi
Oct 14th, 2004, 02:01 PM
I'm in the middle of porting an application to spring rich (and spring) and have places in my code, where I would like to instantiate beans which are defined in my xml context files.
When I'm inside of classes which extend ApplicationServicesAccessorSupport, there is no problem, I just use the protected getApplicationContext().getBean(String).
But, when I want to do the same in my 'legacy' code, I'm stuck. Or maybe I'm just too dumb to find the correct way.
A static method like Application.getContext() would help a lot, but Spring people don't use 'static', do they ? :wink:
Any hint is appreciated.
Thanks
Kambiz
When I'm inside of classes which extend ApplicationServicesAccessorSupport, there is no problem, I just use the protected getApplicationContext().getBean(String).
But, when I want to do the same in my 'legacy' code, I'm stuck. Or maybe I'm just too dumb to find the correct way.
A static method like Application.getContext() would help a lot, but Spring people don't use 'static', do they ? :wink:
Any hint is appreciated.
Thanks
Kambiz