Can you just mark it as transient and re-create it on a lazy creation basis?  
I've not looked but that seems like an appropriate use of transient.

Chuck

On 2015-05-20, 6:45 PM, "Paul Hoadley" wrote:

On 20 May 2015, at 9:21 am, Paul Hoadley 
<pa...@logicsquad.net<mailto:pa...@logicsquad.net>> wrote:

On 20 May 2015, at 1:53 am, Ramsey Gurley 
<rgur...@smarthealth.com<mailto:rgur...@smarthealth.com>> wrote:
On May 19, 2015, at 4:03 AM, Paul Hoadley 
<pa...@logicsquad.net<mailto:pa...@logicsquad.net>> wrote:
I've had a look at Ramsey's ERPersistentSessionStorage.framework, and my 
intention was to create something similar backed by memcached.  I got it 
working to the proof-of-concept level on a trivial app, but using native Java 
serialisation seems brittle.  (By which I mean it falls over pretty fast when 
you throw a serialisation-based approach into a substantial application.)
I'm curious about the "falls over pretty fast" part. What sort of problems do 
you have?
Serialization failures.  (To be clear, I'm talking about testing with my own 
memcached-based approach, but it's really only some very minor changes to your 
work to use memcached instead of the database as the back-end.)  Initially it 
was my own classes, which I could fix, but then I started hitting weirdness 
like this:
Caused by: java.io.NotSerializableException: java.lang.reflect.Field
It's not obvious to me where that's coming from, or how to fix it.

Having just discovered this:

-Dsun.io.serialization.extendedDebugInfo=true

I can report that the java.lang.reflect.Field is in an ERXDisplayGroup.  And 
here it is:

public class ERXDisplayGroup<T> extends WODisplayGroup {
private Field displayedObjectsField;

So is ERXDisplayGroup simply not serializable, and hence I'd need to pull it 
from any application that wanted to use ERPersistentSessionStorage.framework?


--
Paul Hoadley
http://logicsquad.net/



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      
(Webobjects-dev@lists.apple.com<mailto:Webobjects-dev@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/chill%40gevityinc.com

This email sent to ch...@gevityinc.com<mailto:ch...@gevityinc.com>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to