Re: Session Persistence (Database)
Re: Session Persistence (Database)
- Subject: Re: Session Persistence (Database)
- From: Ramsey Gurley <email@hidden>
- Date: Sun, 05 Jun 2011 20:49:30 -0700
If you add
sun.io.serialization.extendedDebugInfo=true
to your properties, it should give you much better information about what is preventing serialization. But, yeah, what Mike said. It will be a lot of work trying to serialize sessions, because nobody does it.... so I'm sure there will be lots of places where this happens. [I think it would be cool if we could fix that. (^_^) A persistent session store could be pretty handy.]
ERXSession has a couple of problems serializing. The _objectStore field is an anonymous inner class and not serializable. It would appear that needs to be transient. ERXAjaxSession superclass has another. The non static Logger will not serialize. Not sure why that isn't just static final anyway. I don't think there's any reason to have one logger field for each session instance.
I also had to make ERD2WContext and ERXNavigationState implement Serializable because those get stuffed into the session's object store. After that, I was able to successfully serialize an ERXSession from my main page.
Not that those two classes necessarily should be serializable... Since pretty much anything can get stuffed into the _componentState dictionary. Looks like ERXSession probably should have some custom serialization logic to deal with non-serializable objects in the object store dictionary.
Ramsey
On Jun 5, 2011, at 8:47 AM, Kevin Hinkson wrote:
>
> On 5 Jun 2011, at 11:36, Mike Schrag wrote:
>
>> 1) do you just need users to be auto-logged-in when they come back? just use cookies
>
> To be honest the more I think about it, this is all I need right now, so cookies it is. I'll keep what you said about full session failover in mind as I design the app.
>
> Thanks Mike.
>
> ---
> Kevin Hinkson
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden