Hey

James Cook wrote:
> When you get to an object that would be serialized to the database (just
> about every object besides a String, Date, BigDecimal, etc.), you can
> continue the reflection by recursing into the object. So, if a person want
> to CMP a Vector, you would recurse into it and store the
> elementData[](recurse into this array also), elementCount, and
> capacityIncrement values in a Hashtable.
>
> I believe this would be generic, however you would bypass the equals()
> method unnecessarily if the person actually implemented it.

An Other method would be to calculate and store the CRC32 of the object
before it is serialized, and then compute the CRC32 of the serialized
object when deciding if it has been updated or not. "Foolproof" but
requires serialization to be performed.

> I think the most generic approach would be the least valuable in this case.

Yep, me too. But that wasn't the question. The question was how
container vendors who need to be generic actually did it, as I couldn't
see any Good(tm) solutions.

/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".

Reply via email to