We are implementing an enterprise financial Web application software. We're using spring, hibernate, oracle(DB), JSF. The requirements are changing over maintenance phase of software and we must have multiple version of some entities(also managers, forms, ... classes) at the same time because of compatibility of previous version of software. This changes of classes include : Add/Remove fiels, Change fields, Add/Remove Class, ... In general this problem is running multiple version of software at the same time. Please help me to find a solution for this problem.
Clarification:
This problem is similar with "variability in time" in software product line (See elsner_vamos2010 for more information). This means that we may have multiple version of one class at the same time and we must get class with (or date) parameter. In each date one version of class must be used Because of compatibility with state of program on that date. We solve this problem on Bean class with XML file and get version of class with date. So, The program knows what bean must be run for this state of program (date of other entities).
But we can't solve it for other object types in spring such as entity, jsp, form?
you can deploy different versions of your project in different WARs/EARs. In this case your container will take care about them automatically. Each war will be loaded with its own classloader, so the different versions of the same class (package and class name) will not intersect. Is this option good enough?