Where did I suggest that you had to package that xml file in the war?

Originally Posted by
mdeinum
Move remoting configuration to a seperate xml in the file system, leave this xml blank for production and configured for all other environments.
You can load an xml file from ANYWHERE... Put it next to your properties file and instead ofloading it from the classpath use a file: prefix to load it from the file system. That way you don't need to hack away on classes, extend anything, create some nasty factorybean/selection mechanism.
Code:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml,file:/opt/app/conf/remoting-context.xml</param-value>
</context-param>