Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

RE: Can the Transient cache store non Serializable objects.: msg#00036

Subject: RE: Can the Transient cache store non Serializable objects.
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@xxxxxxxx] 
> 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@xxxxxxxxx]
> > Sent: Monday, May 17, 2004 8:04 AM
> > To: turbine-jcs-dev@xxxxxxxxxxxxxxxxxx
> > 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@xxxxxxxxxxxxxxxxxx
> > For additional commands, e-mail:
> turbine-jcs-dev-help@xxxxxxxxxxxxxxxxxx
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@xxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: 
> turbine-jcs-dev-help@xxxxxxxxxxxxxxxxxx
> 
> 


<Prev in Thread] Current Thread [Next in Thread>