|
Ah, you're triggering this from within an app context? I rather expected that signal to come from the outside. In that case, we might make the servlet listening to its context's ContextRefreshedEvent, as well as offering the public "refresh()" operation on the servlet. That would allow to trigger a full refresh through the app context's "refresh()" method as well. Juergen Well, I'm willing to trigger the refresh externally (via JMX was my plan, but other possiblities too) but I'm not sure how to get a reference to the DispatcherServlet to call the refresh method. That being said, I think that the additional ContextRefreshedEvent should be added as well. It's much easier to trigger it that way via JMX for sure, but both cases should be supported I think. I've finally added the ContextRefreshedEvent support as well. DispatcherServlet/Portlet automatically refreshes its internal state if its ApplicationContext refreshes. So any bean which lives in the dispatcher's context may obtain a ConfigurableApplicationContext reference and call "refresh()" on it. Juergen |
||||||||||||||||||||||||||||||||||||||
I've added a public "refresh()" operation with protected "onRefresh()" template method to FrameworkServlet/Portlet, and implemented "onRefresh()" accordingly in DispatcherServlet/Portlet. So if you call "refresh()" on the servlet instance, it should do a full refresh including a refresh of its strategy objects.
I'd appreciate if you give this a try in a 2.0.4 snapshot, Ben!
Juergen