Howdy,

>Looping through a collection, you can't just try to call clone() on
each
>element because clone() is protected in Object and Cloneable is only a
>marker interface. So, you have to (1) know the type of the object and
>cast it before cloning, (2) use reflection to call clone or (3) clone
>via serialization.
>
>(3) is too slow.

I would not rush to that conclusion.  Depending on your object graph,
and if you can live with the restriction that every MDC value must be
serializable, serialization be fast enough for you.  Give it a shot
before concluding it's too slow.  I use common-lang's SerializationUtils
regularly in production systems on large object graphics without a
problem.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to