The question seems to imply that your objects are stored in a database. It might be more useful to do the conversion in the database? Usually a new version detects an old serializable format and then updates the record.
Having different versions in a process for the same class is and will always be a pita because it is one of the core assumptions of Java language that there is only one namespace. The runtime does allow it with class loaders but we all know how complex class loaders are. Kind regards, Peter Kriens > On 12 aug. 2015, at 08:50, Frank Langel <fr...@frankjlangel.com> wrote: > > Hello, > > Allow a question > > Use Case : Data structure evolution > application evolves, class A evolves from 1.0.0 to 2.0.0 > Need to do an update and retrieve all data by mapping from A(1.0.0) —> > A(2.0.0) > How do I solve this use case > Does OSGI, perhaps in its latest version, allow for it ? > I understand that in previous versions, it wasn’t supported > http://stackoverflow.com/questions/18722932/can-an-osgi-bundle-or-package-depend-on-multiple-versions-of-another-bundle-or-p > > <http://stackoverflow.com/questions/18722932/can-an-osgi-bundle-or-package-depend-on-multiple-versions-of-another-bundle-or-p> > > Current solution > > I could use a canonical model A(1.0.0) —> C — > A(2.0.0) , where I would > import A1.0.0 in Bundle b1, and A2.0.0 in Bundle b2, and C into B1 and b2, > and then map A1.0.0 -> C and C —> A2.0.0, but I was wondering if there is an > easier way and allow a point to point mapping without using the canonical > class. > > I don’t think there is anything wrong with my current solution, but perhaps > there is some functionality in the latest OSGI version that simplifies this? > Thanks a lot > Frank > > > > > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev