I am currently developing a web application based upon Struts2 & Spring components combined with a set of tier libraries in a company-made framework.
These librairies expose sets of spring beans, through blahblah.xml files embedded in the provided jar files.
I need to replace some of the implementation classes exposed through such bean declarations with my own classes, in order to add extra stuff in the provided processing.
People who designed the company-made framework chose to expose the blahblah.xml files to Spring through a specific Listener & WebApplicationContext that defines such configLocations :
ConfigurableWebApplicationContext cwac = new XmlWebApplicationContext();
cwac.setConfigLocation("classpath*:<somePath>/blahblah.xml");
For the moment I see only one way to achieve the job (but maybe I'm wrong, please let me know !) : make a copy of blahblah.xml out of the jar in a fake directory structure, modify the implementation class of some beans inside the copy, and then put the folder that includes the fake structure in the webapp classpath in order to "shadow" the original one.
That is what leads me to the problem of being able to force precedence to this in the classpath of TOMCAT 5.5 that I use for development under eclipse 3.3.
Although I added the directory containing the fake structure in the Classpath tab of the Launch Configuration of my Tomcat Server under eclipse 3.3, the injected object is still the original one instead of mine. I guess that my folder is placed after the WEB-INF/lib jars in the TOMCAT running classpath, but I have no way to grab it.
Any ideas ?