You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Abhijit Ghosh <ab...@gmail.com> on 2009/08/20 11:33:07 UTC
Re: [jira] Created: (TRINIDAD-1557) XMLMenuModel data structures are
not fully serializable.
Blake,
Please find my response inline:
On Wed, Aug 19, 2009 at 8:40 PM, Blake Sullivan
<bl...@oracle.com>wrote:
> Abhijit S Ghosh (JIRA) said the following On 8/19/2009 6:32 AM PT:
>
>> XMLMenuModel data structures are not fully serializable.
>> --------------------------------------------------------
>>
>> Key: TRINIDAD-1557
>> URL: https://issues.apache.org/jira/browse/TRINIDAD-1557
>> Project: MyFaces Trinidad
>> Issue Type: Bug
>> Reporter: Abhijit S Ghosh
>>
>>
>> XMLMenuModel data structures are not fully serializable,which causes
>> problems during session state replication in high availability
>> environments,if subclasses use session to cache menu data structures.This
>> will also create problems during normal serialization.
>> The data structure object hierarchy should be made completely
>> serializable.
>>
>>
>>
> Abhijit,
>
> Do we really need the structure to be Serializable? If we can rebuild the
> structure after fail-over, it is preferable to use a TransientHolder to hold
> a reference to the unserializable structure and then lazily rebuild the
> structure if necessary.
That is what I am doing here.The non-serializable references have been
marked as transient and the tree model is rebuilt by reading the xml stream
again.So actually no serialization happens.I blow away the cache when I
detect a deserialized tree and rebuild the cache.
Thanks,
Abhi
>
>
> -- Blake Sullivan
>
>
Re: [jira] Created: (TRINIDAD-1557) XMLMenuModel data structures are
not fully serializable.
Posted by Abhijit Ghosh <ab...@gmail.com>.
Hi,
If everyone agrees with the changes in the new patch,please commit the
patch.
Thanks,
Abhi
On Fri, Aug 21, 2009 at 3:10 AM, Abhijit Ghosh <ab...@gmail.com>wrote:
> Blake/Matthias,
> I have provided a new patch which uses the TransientHolder wrapper.Thanks
> for your comments and suggestions.
>
> Thanks,
> Abhi
>
>
> On Thu, Aug 20, 2009 at 6:18 PM, Abhijit Ghosh <ab...@gmail.com>wrote:
>
>> I will submit a new patch using the TransientHolder utility as I think
>> that would be more elegant in terms of code changes.
>>
>> -- Abhi
>>
>>
>> On Thu, Aug 20, 2009 at 3:32 PM, Abhijit Ghosh <abhijit.s.ghosh@gmail.com
>> > wrote:
>>
>>> Yes,I saw that class,but essentially I am doing the same thing as that
>>> class.I can re-implement it using TransientHolder if that is preferable.
>>>
>>> Thanks,
>>> Abhi
>>>
>>>
>>> On Thu, Aug 20, 2009 at 3:15 PM, Matthias Wessendorf <ma...@apache.org>wrote:
>>>
>>>> On Thu, Aug 20, 2009 at 11:33 AM, Abhijit
>>>> Ghosh<ab...@gmail.com> wrote:
>>>> > Blake,
>>>> > Please find my response inline:
>>>> >
>>>> > On Wed, Aug 19, 2009 at 8:40 PM, Blake Sullivan <
>>>> blake.sullivan@oracle.com>
>>>> > wrote:
>>>> >>
>>>> >> Abhijit S Ghosh (JIRA) said the following On 8/19/2009 6:32 AM PT:
>>>> >>>
>>>> >>> XMLMenuModel data structures are not fully serializable.
>>>> >>> --------------------------------------------------------
>>>> >>>
>>>> >>> Key: TRINIDAD-1557
>>>> >>> URL:
>>>> https://issues.apache.org/jira/browse/TRINIDAD-1557
>>>> >>> Project: MyFaces Trinidad
>>>> >>> Issue Type: Bug
>>>> >>> Reporter: Abhijit S Ghosh
>>>> >>>
>>>> >>>
>>>> >>> XMLMenuModel data structures are not fully serializable,which causes
>>>> >>> problems during session state replication in high availability
>>>> >>> environments,if subclasses use session to cache menu data
>>>> structures.This
>>>> >>> will also create problems during normal serialization.
>>>> >>> The data structure object hierarchy should be made completely
>>>> >>> serializable.
>>>> >>>
>>>> >>>
>>>> >>
>>>> >> Abhijit,
>>>> >>
>>>> >> Do we really need the structure to be Serializable? If we can
>>>> rebuild the
>>>> >> structure after fail-over, it is preferable to use a TransientHolder
>>>> to hold
>>>> >> a reference to the unserializable structure and then lazily rebuild
>>>> the
>>>> >> structure if necessary.
>>>> >
>>>> > That is what I am doing here.The non-serializable references have been
>>>> > marked as transient and the tree model is rebuilt by reading the xml
>>>> stream
>>>> > again.So actually no serialization happens.I blow away the cache when
>>>> I
>>>> > detect a deserialized tree and rebuild the cache.
>>>>
>>>> I think Blake was talking about this class:
>>>>
>>>>
>>>> http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/util/TransientHolder.html
>>>>
>>>> >
>>>> > Thanks,
>>>> > Abhi
>>>> >
>>>> >>
>>>> >>
>>>> >> -- Blake Sullivan
>>>> >>
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Matthias Wessendorf
>>>>
>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>> sessions: http://www.slideshare.net/mwessendorf
>>>> twitter: http://twitter.com/mwessendorf
>>>>
>>>
>>>
>>
>
Re: [jira] Created: (TRINIDAD-1557) XMLMenuModel data structures are
not fully serializable.
Posted by Abhijit Ghosh <ab...@gmail.com>.
Blake/Matthias,
I have provided a new patch which uses the TransientHolder wrapper.Thanks
for your comments and suggestions.
Thanks,
Abhi
On Thu, Aug 20, 2009 at 6:18 PM, Abhijit Ghosh <ab...@gmail.com>wrote:
> I will submit a new patch using the TransientHolder utility as I think that
> would be more elegant in terms of code changes.
>
> -- Abhi
>
>
> On Thu, Aug 20, 2009 at 3:32 PM, Abhijit Ghosh <ab...@gmail.com>wrote:
>
>> Yes,I saw that class,but essentially I am doing the same thing as that
>> class.I can re-implement it using TransientHolder if that is preferable.
>>
>> Thanks,
>> Abhi
>>
>>
>> On Thu, Aug 20, 2009 at 3:15 PM, Matthias Wessendorf <ma...@apache.org>wrote:
>>
>>> On Thu, Aug 20, 2009 at 11:33 AM, Abhijit
>>> Ghosh<ab...@gmail.com> wrote:
>>> > Blake,
>>> > Please find my response inline:
>>> >
>>> > On Wed, Aug 19, 2009 at 8:40 PM, Blake Sullivan <
>>> blake.sullivan@oracle.com>
>>> > wrote:
>>> >>
>>> >> Abhijit S Ghosh (JIRA) said the following On 8/19/2009 6:32 AM PT:
>>> >>>
>>> >>> XMLMenuModel data structures are not fully serializable.
>>> >>> --------------------------------------------------------
>>> >>>
>>> >>> Key: TRINIDAD-1557
>>> >>> URL:
>>> https://issues.apache.org/jira/browse/TRINIDAD-1557
>>> >>> Project: MyFaces Trinidad
>>> >>> Issue Type: Bug
>>> >>> Reporter: Abhijit S Ghosh
>>> >>>
>>> >>>
>>> >>> XMLMenuModel data structures are not fully serializable,which causes
>>> >>> problems during session state replication in high availability
>>> >>> environments,if subclasses use session to cache menu data
>>> structures.This
>>> >>> will also create problems during normal serialization.
>>> >>> The data structure object hierarchy should be made completely
>>> >>> serializable.
>>> >>>
>>> >>>
>>> >>
>>> >> Abhijit,
>>> >>
>>> >> Do we really need the structure to be Serializable? If we can rebuild
>>> the
>>> >> structure after fail-over, it is preferable to use a TransientHolder
>>> to hold
>>> >> a reference to the unserializable structure and then lazily rebuild
>>> the
>>> >> structure if necessary.
>>> >
>>> > That is what I am doing here.The non-serializable references have been
>>> > marked as transient and the tree model is rebuilt by reading the xml
>>> stream
>>> > again.So actually no serialization happens.I blow away the cache when I
>>> > detect a deserialized tree and rebuild the cache.
>>>
>>> I think Blake was talking about this class:
>>>
>>>
>>> http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/util/TransientHolder.html
>>>
>>> >
>>> > Thanks,
>>> > Abhi
>>> >
>>> >>
>>> >>
>>> >> -- Blake Sullivan
>>> >>
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Matthias Wessendorf
>>>
>>> blog: http://matthiaswessendorf.wordpress.com/
>>> sessions: http://www.slideshare.net/mwessendorf
>>> twitter: http://twitter.com/mwessendorf
>>>
>>
>>
>
Re: [jira] Created: (TRINIDAD-1557) XMLMenuModel data structures are
not fully serializable.
Posted by Abhijit Ghosh <ab...@gmail.com>.
I will submit a new patch using the TransientHolder utility as I think that
would be more elegant in terms of code changes.
-- Abhi
On Thu, Aug 20, 2009 at 3:32 PM, Abhijit Ghosh <ab...@gmail.com>wrote:
> Yes,I saw that class,but essentially I am doing the same thing as that
> class.I can re-implement it using TransientHolder if that is preferable.
>
> Thanks,
> Abhi
>
>
> On Thu, Aug 20, 2009 at 3:15 PM, Matthias Wessendorf <ma...@apache.org>wrote:
>
>> On Thu, Aug 20, 2009 at 11:33 AM, Abhijit
>> Ghosh<ab...@gmail.com> wrote:
>> > Blake,
>> > Please find my response inline:
>> >
>> > On Wed, Aug 19, 2009 at 8:40 PM, Blake Sullivan <
>> blake.sullivan@oracle.com>
>> > wrote:
>> >>
>> >> Abhijit S Ghosh (JIRA) said the following On 8/19/2009 6:32 AM PT:
>> >>>
>> >>> XMLMenuModel data structures are not fully serializable.
>> >>> --------------------------------------------------------
>> >>>
>> >>> Key: TRINIDAD-1557
>> >>> URL:
>> https://issues.apache.org/jira/browse/TRINIDAD-1557
>> >>> Project: MyFaces Trinidad
>> >>> Issue Type: Bug
>> >>> Reporter: Abhijit S Ghosh
>> >>>
>> >>>
>> >>> XMLMenuModel data structures are not fully serializable,which causes
>> >>> problems during session state replication in high availability
>> >>> environments,if subclasses use session to cache menu data
>> structures.This
>> >>> will also create problems during normal serialization.
>> >>> The data structure object hierarchy should be made completely
>> >>> serializable.
>> >>>
>> >>>
>> >>
>> >> Abhijit,
>> >>
>> >> Do we really need the structure to be Serializable? If we can rebuild
>> the
>> >> structure after fail-over, it is preferable to use a TransientHolder to
>> hold
>> >> a reference to the unserializable structure and then lazily rebuild the
>> >> structure if necessary.
>> >
>> > That is what I am doing here.The non-serializable references have been
>> > marked as transient and the tree model is rebuilt by reading the xml
>> stream
>> > again.So actually no serialization happens.I blow away the cache when I
>> > detect a deserialized tree and rebuild the cache.
>>
>> I think Blake was talking about this class:
>>
>>
>> http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/util/TransientHolder.html
>>
>> >
>> > Thanks,
>> > Abhi
>> >
>> >>
>> >>
>> >> -- Blake Sullivan
>> >>
>> >
>> >
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>
>
Re: [jira] Created: (TRINIDAD-1557) XMLMenuModel data structures are
not fully serializable.
Posted by Abhijit Ghosh <ab...@gmail.com>.
Yes,I saw that class,but essentially I am doing the same thing as that
class.I can re-implement it using TransientHolder if that is preferable.
Thanks,
Abhi
On Thu, Aug 20, 2009 at 3:15 PM, Matthias Wessendorf <ma...@apache.org>wrote:
> On Thu, Aug 20, 2009 at 11:33 AM, Abhijit
> Ghosh<ab...@gmail.com> wrote:
> > Blake,
> > Please find my response inline:
> >
> > On Wed, Aug 19, 2009 at 8:40 PM, Blake Sullivan <
> blake.sullivan@oracle.com>
> > wrote:
> >>
> >> Abhijit S Ghosh (JIRA) said the following On 8/19/2009 6:32 AM PT:
> >>>
> >>> XMLMenuModel data structures are not fully serializable.
> >>> --------------------------------------------------------
> >>>
> >>> Key: TRINIDAD-1557
> >>> URL:
> https://issues.apache.org/jira/browse/TRINIDAD-1557
> >>> Project: MyFaces Trinidad
> >>> Issue Type: Bug
> >>> Reporter: Abhijit S Ghosh
> >>>
> >>>
> >>> XMLMenuModel data structures are not fully serializable,which causes
> >>> problems during session state replication in high availability
> >>> environments,if subclasses use session to cache menu data
> structures.This
> >>> will also create problems during normal serialization.
> >>> The data structure object hierarchy should be made completely
> >>> serializable.
> >>>
> >>>
> >>
> >> Abhijit,
> >>
> >> Do we really need the structure to be Serializable? If we can rebuild
> the
> >> structure after fail-over, it is preferable to use a TransientHolder to
> hold
> >> a reference to the unserializable structure and then lazily rebuild the
> >> structure if necessary.
> >
> > That is what I am doing here.The non-serializable references have been
> > marked as transient and the tree model is rebuilt by reading the xml
> stream
> > again.So actually no serialization happens.I blow away the cache when I
> > detect a deserialized tree and rebuild the cache.
>
> I think Blake was talking about this class:
>
>
> http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/util/TransientHolder.html
>
> >
> > Thanks,
> > Abhi
> >
> >>
> >>
> >> -- Blake Sullivan
> >>
> >
> >
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>
Re: [jira] Created: (TRINIDAD-1557) XMLMenuModel data structures are
not fully serializable.
Posted by Matthias Wessendorf <ma...@apache.org>.
On Thu, Aug 20, 2009 at 11:33 AM, Abhijit
Ghosh<ab...@gmail.com> wrote:
> Blake,
> Please find my response inline:
>
> On Wed, Aug 19, 2009 at 8:40 PM, Blake Sullivan <bl...@oracle.com>
> wrote:
>>
>> Abhijit S Ghosh (JIRA) said the following On 8/19/2009 6:32 AM PT:
>>>
>>> XMLMenuModel data structures are not fully serializable.
>>> --------------------------------------------------------
>>>
>>> Key: TRINIDAD-1557
>>> URL: https://issues.apache.org/jira/browse/TRINIDAD-1557
>>> Project: MyFaces Trinidad
>>> Issue Type: Bug
>>> Reporter: Abhijit S Ghosh
>>>
>>>
>>> XMLMenuModel data structures are not fully serializable,which causes
>>> problems during session state replication in high availability
>>> environments,if subclasses use session to cache menu data structures.This
>>> will also create problems during normal serialization.
>>> The data structure object hierarchy should be made completely
>>> serializable.
>>>
>>>
>>
>> Abhijit,
>>
>> Do we really need the structure to be Serializable? If we can rebuild the
>> structure after fail-over, it is preferable to use a TransientHolder to hold
>> a reference to the unserializable structure and then lazily rebuild the
>> structure if necessary.
>
> That is what I am doing here.The non-serializable references have been
> marked as transient and the tree model is rebuilt by reading the xml stream
> again.So actually no serialization happens.I blow away the cache when I
> detect a deserialized tree and rebuild the cache.
I think Blake was talking about this class:
http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/util/TransientHolder.html
>
> Thanks,
> Abhi
>
>>
>>
>> -- Blake Sullivan
>>
>
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf