Re: org.apache.shale.dialog.basic.config.DialogImpl not serializable

2008-07-23 Thread Rahul Akolkar
On Wed, Jul 23, 2008 at 9:23 AM,  <[EMAIL PROTECTED]> wrote:

>
> Rahul, I debugged and this is my conclusion:
> org.apache.shale.dialog.faces.DialogPhaseListener in
> beforeRenderResponse put in the ViewRoot the
> "org.apache.shale.dialog.OPAQUE_STATE" attribute. The value of this
> attribute is, in my case, a class of BasicDialogContext$TopState and
> there is a reference to DialogImpl (BasicDialoContext has a property
> dialog and TopState is an inner class of BasicDialoContext).
>


Makes sense.


> So I think that the solution could be modify DialogImpl to implement
> Serializable?


Not really, I think TopState should rather be a static nested class (I
don't see any reason for it to be an inner class, the way things are
at the moment). Can you try making that change and testing your app?

Interim, you could choose a different dialog state storage strategy,
such as "stack" (see very bottom of this page [1]), and that should
remedy this as well.

Please open an issue in JIRA (and try the suggestions above if you can).

-Rahul

[1] http://shale.apache.org/shale-dialog-basic/



> If you agree, I'll track to JIRA also the solution...
>
> Please let me know what you think.
>
> Regards
> Mario
>
>


RE: org.apache.shale.dialog.basic.config.DialogImpl not serializable

2008-07-23 Thread mario.buonopane


From: Rahul Akolkar [mailto:[EMAIL PROTECTED] 
Sent: 22 luglio 2008 14.24
To: user@shale.apache.org; [EMAIL PROTECTED]
Subject: Re: org.apache.shale.dialog.basic.config.DialogImpl not
serializable

On Tue, Jul 22, 2008 at 2:45 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
> Rahul, before track it to JIRA, i would like to understand why
> DilogImpl object is present in my HttpSession. At the moment i'm not
> sure if Shale is putting this object in the View root or other
> component is doing it.


Shale only puts the dialog ID (a String) as a view root attribute.

My initial thought was that the DialogImpl reference in the session
may come via BasicDialogContextManager -> BasicDialogContext ->
DialogImpl. I went back and looked at the code a bit, and it seems
that the DialogImpl is a transient reference and will be regenerated
as needed (therefore shouldn't cause the serialization issue). So:

 * Are you using vanilla Shale dialogs?
 * Are there other components that you have introduced that work with
Dialogs?
 * Do you have a smallest possible test case (one that uses the basic
impl as-is)?

-Rahul


> So, if you know that Shale could put an
> DilogImpl object in View root or in HttpSession please let me know. In
> this case i'll track to JIRA attaching the patch.
>
> Regards
> Mario
>

Rahul, I debugged and this is my conclusion:
org.apache.shale.dialog.faces.DialogPhaseListener in
beforeRenderResponse put in the ViewRoot the
"org.apache.shale.dialog.OPAQUE_STATE" attribute. The value of this
attribute is, in my case, a class of BasicDialogContext$TopState and
there is a reference to DialogImpl (BasicDialoContext has a property
dialog and TopState is an inner class of BasicDialoContext).

So I think that the solution could be modify DialogImpl to implement
Serializable?
If you agree, I'll track to JIRA also the solution...

Please let me know what you think.

Regards
Mario 





This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.