Rickard,
In regard to the storing of original values...
I posted a mechanism, a few days ago to this list, that we use to accomplish
this outside of the container. It simply uses reflection to store attribute
values in a hashtable. I'll make the following two assumptions.
1. The attributes that need to be stored are attributes that will be
persisted (by the container in your example). This would include only those
data types that the container knows how to map to a database column. The
equals() method is already in place for each of these types.
2. Those attributes that do not map to a database column, I presume will be
serialized to a db column. In this case, a equals() method will have to be
properly implemented. I don't know of any containers that support object
serialization for container-managed persistence, but I have to believe that
they will or that some do already.
jim
----- Original Message -----
From: Rickard �berg <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 23, 1999 6:37 AM
Subject: Tuned DB update implementation strategies
Hey
Awhile back the subject of tuned dbms updates arose, and a couple of
vendors claimed to support it.
I am interested in hearing how this is accomplished.
My suspicion of the claims comes from the following. I can see these
implementation possibilities:
1. upon ejbLoad store the fresh values. When ejbStore is called simply
compare the stored values with the current, and store the modified ones.
2. Postcompile the EntityBean classes so that all operations which set
the value marks the field as dirty. ejbStore then only stores the dirty
fields, if any.
1. relies on the correct implementation of equals() in all objects. Can
this be guaranteed, especially for complex objects?
2. fails if an attribute is mutable, in which case it is possible to
change the value of the field without actually settig it.
Are there any more implementation possibilities?
If any of the above are used, how are the given problems handled?
Thanks!
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".