jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: Can the Transient cache store non Serializable objects.
Date Tue, 18 May 2004 05:58:14 GMT
Hi Aaron,

it would be great if you could remove the cast and only require
serializable objects if they are written to disk.

Thanks!
Carsten 

> -----Original Message-----
> From: Aaron Smuts [mailto:aasmuts@wisc.edu] 
> Sent: Tuesday, May 18, 2004 2:57 AM
> To: 'Turbine JCS Developers List'
> Subject: RE: Can the Transient cache store non Serializable objects.
> 
> 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:agallardo@agssa.net]
> > Sent: Monday, May 17, 2004 8:04 AM
> > To: turbine-jcs-dev@jakarta.apache.org
> > 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: 
> turbine-jcs-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> turbine-jcs-dev-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
> turbine-jcs-dev-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org


Mime
View raw message