ICEfaces
  1. ICEfaces
  2. ICE-7694

Inner class of PushRenderer is not serializable

    Details

    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      Under certain conditions I am seeing the following exception:

      Caused by: java.io.NotSerializableException: org.icefaces.application.PushRenderer$2

      To replicate I:

      1) Deploy and run the ACE Showcase
      2) Choose the ace:progressBar > Push example and run the progress bar
      3) Shut down Tomcat and restart it (which should serialize/deserialize the current session)

      It seems that the LongTaskManager class is a window-scoped bean used in the noted example and that it keeps a reference to a PortableRenderer - an anonymous inner class of PushRenderer - and the inner class is not Serializable. This is by design.

      Simply marking the "private PortableRenderer renderer" instance as transient has side effects that break the proper operation of the progress bar.

        Activity

        Hide
        Deryk Sinotte added a comment -

        It's easier to reproduce by running with MyFaces and changing the scope of LongTaskManager to ViewScoped (from Window). That way it attempts to serialize on each request.

        Show
        Deryk Sinotte added a comment - It's easier to reproduce by running with MyFaces and changing the scope of LongTaskManager to ViewScoped (from Window). That way it attempts to serialize on each request.
        Hide
        Mircea Toma added a comment -

        Acquire PortableRenderer just before progress bar thread is started. This way there's no need to handle PortableRenderer's serialization/deserialization.

        Show
        Mircea Toma added a comment - Acquire PortableRenderer just before progress bar thread is started. This way there's no need to handle PortableRenderer's serialization/deserialization.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: