Configure Spring to use specific version of a class

I have a java application that requires the latest commons-dbcp version (1.3) and it's db connection pool is configured by Spring. This application is but one of a list of applications in the same tomcat (a suite if you like) and many of them use an older version of commons-dbcp (1.2.1), all configured by Spring.

So, while I can compile (with Maven) my application with DBCP 1.3, I can't run it because Spring is trying to configure my db connection pool with the old version, which is in /shared/lib in Tomcat.

The problem I have is that I do not have time, nor the approval, to upgrade everything to 1.3, just the one application I'm fixing. Is it possible to force Spring, in the components.xml file of my application (or by some other means) to the new DBCP version so that only it will run the new version and not affect any other application?

Answers


As long as you have the 1.2.1 version in /shared/lib there is no easy way to achieve what you need, as far as I know.

What you typically do in this case is that you bundle the 1.2.1 version with the applications that need that version (for example in WEB-INF/lib if they are web applications) and bundle the 1.3 version with your application.


Need Your Help

Getting “failed to start accepting connection” while deploying my app into bluemix

node.js db2 bluemix

Hi Am facing "failed to start accepting connection" error while pushing or deploying my app to bluemix. Can any help me in that.... my code snippet as given below:

Overriding “Text” property derived from System::Windows::Forms::Control C++/CLI

c++-cli control override

I'm trying to override "Text" property in base class i've searched to anywhere before but it doesn't make any change, and i'm still confused how can i put the code correctly, of course in header fi...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.