ICEfaces
  1. ICEfaces
  2. ICE-11087

Make all component and related model classes Serializable

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: EE-4.1.0.GA
    • Fix Version/s: 4.2
    • Labels:
      None
    • Environment:
      Any

      Description

      After fixing ICE-11056, it was found that many component classes do not implement java.io.Serializable. It is important for all components to be serializable, not only for the type of issues described in ICE-11056, but for many other situations. This task is for making sure that all component classes implement java.io.Serializable.

        Activity

        Hide
        Mircea Toma added a comment - - edited

        The JSF components do not need to be serializable, they are created every time a JSF lifecycle is started. Their state is restored through the JSF restore/store mechanism not Java's object de/serialization. Even if they would be restored through deserialization they would not be setup correctly to run as JSF expects them to.

        Now it the case of ICE-11056 the app server container was complaining that the Tooltip is not serializable because one of the beans in showcase keeps a reference to the actual component object (through a component biding). Now the correct solution would have been to get rid of the component binding. If that entails significant changes it would be enough to make the bean field (referencing the component object) transient.

        Show
        Mircea Toma added a comment - - edited The JSF components do not need to be serializable, they are created every time a JSF lifecycle is started. Their state is restored through the JSF restore/store mechanism not Java's object de/serialization. Even if they would be restored through deserialization they would not be setup correctly to run as JSF expects them to. Now it the case of ICE-11056 the app server container was complaining that the Tooltip is not serializable because one of the beans in showcase keeps a reference to the actual component object (through a component biding). Now the correct solution would have been to get rid of the component binding. If that entails significant changes it would be enough to make the bean field (referencing the component object) transient.
        Hide
        Mircea Toma added a comment -

        After searching through the ACE components for instances where the data model objects are saved in any of them scope maps, I could find no instance where the object was not already serializable.

        Show
        Mircea Toma added a comment - After searching through the ACE components for instances where the data model objects are saved in any of them scope maps, I could find no instance where the object was not already serializable.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arturo Zambrano
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: