Hi. We have two versions of the same application. They share some persistent objects (same class name and package), but they are slightly different in the second version, because of some modifications. We have lots of contents on the first application that we want to migrate to the second.
This is what we thought:
1.- Have two different jars with the persistent objects of each application.
2.- Have two different ClassLoader objects, with each one loading one of the jars.
3.- Have two different Hibernate configurations/sessions, each one associated to one of the class loaders.
We would load the objects from one session, create new objects on the second, and transfer the fields from one to another using reflection.
I think this is feasible, and we always have the option of using JDBC directly, which we would like to avoid.
Is there any alternative? Any thoughts about our approach?
Thanks in advance
|