Ah,
The things is I don't save anything on the session. In the Authentication
module I have a DataSoure object. But I have marked it as transient. So as
far as I know it should be ignored when serializing. Other than that I am
not storing anything on the session.
Regards,
lasitha
From: Jan.Luehe_at_Sun.COM [mailto:Jan.Luehe_at_Sun.COM]
Sent: Monday, November 16, 2009 10:26 PM
To: users_at_glassfish.dev.java.net
Subject: Re: Custom Login Realm Serializable Exception
On 11/16/09 07:34, Hassan Schroeder wrote:
On Sun, Nov 15, 2009 at 3:54 AM, Lasitha Kodikara
<mailto:lasithabk_at_millenniumit.com> <lasithabk_at_millenniumit.com> wrote
However even I get this, when I stop and starts the server still the user
authentication is remembered (J).
Can you please help me to get rid of this exception.
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: sun.security.acl.PrincipalImpl
What is unclear about this? You're storing a non-serializable object
in the session. Sessions are preserved across restarts by being saved
to the file system, but your authenticated session can't be.
Thanks, Hassan, you're absolutely right!
And of course, this behaviour may be turned off as described here:
<
http://blogs.sun.com/jluehe/entry/how_to_disable_persisting_of>
http://blogs.sun.com/jluehe/entry/how_to_disable_persisting_of
("How to Disable Persisting of Memory-based HTTP Sessions during a
Server Restart")
Jan
HTH,
--
Hassan Schroeder ------------------------ hassan.schroeder_at_gmail.com
twitter: @hassan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net
*******************************************************************************************************************************************************************
"The information contained in this email including in any attachment is confidential and is meant to be read only by the person to whom it is addressed. If you are not the intended recipient(s), you are prohibited from printing, forwarding, saving or copying this email. If you have received this e-mail in error, please immediately notify the sender and delete this e-mail and its attachments from your computer."
*******************************************************************************************************************************************************************