The call to put in cacheaccess casts the object to Serializable. It doesn't actually serialize the object. It actually probably shouldn't even do this casting. Are you getting errors? I can probably remove it. You can create a wrapper that is serializable for the mean time.
An object is fine. An object need to be serializable only if it is going to be distributed or spooled to disk. If the items are just kept in memory, then it is no problem. Aaron > -----Original Message----- > From: Antonio Gallardo [mailto:[EMAIL PROTECTED] > Sent: Monday, May 17, 2004 8:04 AM > To: [EMAIL PROTECTED] > Subject: Can the Transient cache store non Serializable objects. > > Hi: > > We are testing at Cocoon JCS. The actual tests are running well. But we > have a question: > > Is posible to store in the Transient cache non-Serializable objects? We > noted that o.a.jcs.access.CacheAccess.put() serialize the content of the > Object. We needed to change an Object to allow it work with JCS: > > http://marc.theaimsgroup.com/?l=xml-cocoon-cvs&m=108479287011928&w=2 > > But now we have a problem: > > The class in question contains: > > 1) private Logger logger; /* from AbstractLogEnabled */ > 2) private SourceResolver resolver; > 3) private String systemId; > 4) protected Map namespaceURIs = new HashMap(); > 5) private ServiceManager manager; > > While 3 and 4 are Serializable, the rest is not. Now, please explain how > fields 1, 2, and 5 will be de-serialized. We know the default Java > behavior in this scenario is: they will be null. Next, imaging how those > XSP pages we are testing will work when 1,2, and 5 are null. > > This problem is crucial for us. Please explain about that. > > Best Regards, > > Antonio Gallardo > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
