By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,053 Members | 922 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,053 IT Pros & Developers. It's quick & easy.

Java persistence

P: n/a
Hi group,

i'm looking for a Java persistence framework that is able to cope with
changes of the class source, i.e. new/changed attributes and/or
methods. Say you have an exported (persistent) instance of a old class
version and want to reload it into a newly started program that uses a
new version of the class. Is there some framework that can do the job
or do i have a strange idea of what instance persistence realy is?
Thanks, Frank.

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Unless one of the truly world-class propeller heads can prove me wrong, I'm
going out on a limb and saying that, if your class definition changes in
your code, then you can't load an instance of an earlier version of the
class into the JVM running the new version.

"Frank Grimm" <fg****@netscape.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi group,

i'm looking for a Java persistence framework that is able to cope with
changes of the class source, i.e. new/changed attributes and/or
methods. Say you have an exported (persistent) instance of a old class
version and want to reload it into a newly started program that uses a
new version of the class. Is there some framework that can do the job
or do i have a strange idea of what instance persistence realy is?
Thanks, Frank.

Jul 17 '05 #2

P: n/a

"Dan Nuttle" <d_******@hotmail.com> wrote in message
news:wS****************@newsread2.news.atl.earthli nk.net...
Unless one of the truly world-class propeller heads can prove me wrong,
I'm
going out on a limb and saying that, if your class definition changes in
your code, then you can't load an instance of an earlier version of the
class into the JVM running the new version.


It may be possible using reflection, but the problem is ill-defined. If
for example, you have a field called "foo", and then you rename the field
"bar", is the persistence framework supposed to be able to guess that "bar"
is a renaming of "foo" and not just an entirely new field (which
coincidentally appear just when the field "foo" disappeared)?

There's no technical reason why this wouldn't be possible, only
pragmatic/business-rule reasons.

- Oliver
Aug 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.