jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heinz Drews" <he...@drews.tc>
Subject Re: Why a cached object must be Serializable
Date Sat, 24 May 2003 11:54:36 GMT

I agree with you that the signature should be Serializable and not Object.
But only because the CacheAccess implementation already forces that the
have to be Serializable or a ClassCastException  is thrown.
It would be better if the check is done at compile time and not at run time.

For the remaining part of you proposal regarding the cloning I absolutely
The Cache pattern is for SHARED objects.
If an object is not designed to be shareble or thread-safe then it can't be
Pool, Factory or other patterns have to be used.

It can't be the job of an implementation to correct design errors.

Best regards,

View raw message