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.


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

2008-07-22 Thread Rahul Akolkar
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
>


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

2008-07-21 Thread [EMAIL PROTECTED]
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. 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



_
Tiscali Family: Adsl e Telefono senza limiti e senza scatto alla risposta. PER 
TE CON IL 25% DI SCONTO FINO AL 2010! Attiva entro il 24/07/08. 
http://abbonati.tiscali.it/promo/tuttoincluso/ 



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

2008-07-21 Thread Rahul Akolkar
On Fri, Jul 18, 2008 at 8:40 AM, Mario Buonopane <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to serialize my HttpSession but I receive an error because
> org.apache.shale.dialog.basic.config.DialogImpl is not Serializable.
>


I cannot talk to the original intent, but I do think it makes sense to
have most bits in the config package above be Serializable.


> I think Shale is putting an object of this class in the view...
>
> Can you help me please?
>


If you want to track this, you could open an improvement request in
JIRA [1]. Further, if you want to help (which will increase the
chances that the JIRA issue will be looked at sooner), you could
attach a patch as well (see link to the "Apache Contributors Guide").

-Rahul

[1] http://shale.apache.org/issue-tracking.html


> Thanks in advance
> Mario
>
>


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

2008-07-18 Thread Mario Buonopane
Hi, I’m trying to serialize my HttpSession but I receive an error 
because org.apache.shale.dialog.basic.config.DialogImpl is not Serializable.


I think Shale is putting an object of this class in the view...

Can you help me please?

Thanks in advance
Mario