Loading a spring context in a Swing app
Hi,
I'm working on a Swing app that uses Spring and I would like to know how I could get a handle to the app context once it has been created. In my main method, I load all of the context paths using ClassPathXmlApplicationContext(). Then I have Spring launch the Swing app by calling the init() method (creates the JFrame, etc.).
Now I have some Swing actions that need a handle to the spring context in order to retrieve service beans. How am I suppose to retrieve this app context? Is there a nice helper method provided by Spring that does this, or must I create some sort of singleton to retrieve the app context? Thanks in advance!
-los