We've got a fairly standard application-context.xml that imports several classpath sub-contexts.
Currently our database connections and memcached configurations are in custom XML outside of the WAR. We'd like to move this configuration to Spring, but keep them outside of the WAR for possibly reloading w/o deploying a new WAR and/or bouncing the container. Using the standard <import resource="file:/path/to/memcached.xml"/> doesn't allow for reloading.
Is this possible? I've been playing around with extending FileSystemXmlApplicationContext with the WebApplicationContext as the parent context but haven't really had any luck. I've exposed the refresh method via JMX, and it reloads the external XML context, but the parent context doesn't have access to the beans in the child. Is there a way to have the child context delegate up to the parent context for everything except refresh()?
Thanks for any input, direction or ideas.


Reply With Quote

