Menu

#1141 GenericComposer supports clustering (Serializable)

3.6.2
closed
nobody
General (239)
5
2009-06-10
2009-06-10
Tom M. Yeh
No

such that it can be used in a clustering environment.

Discussion

  • Tom M. Yeh

    Tom M. Yeh - 2009-06-10

    Ready since 6/10
    ---
    If you want a composer to be serializable, declare java.io.Serializable and transient for all variables to be wired. For example,

    public class Composer5 extends GenericForwardComposer implements java.io.Serializable {
    private transient Textbox firstName;
    private transient Textbox lastName;
    private transient Label fullName;

    /** onChange event from firstName component
    */
    public void onChange$firstName(Event event) {
    fullName.setValue(firstName.getValue()+" "+lastName.getValue());
    }

    /** onChange event from lastName component
    */
    public void onChange$lastName(Event event) {
    fullName.setValue(firstName.getValue()+" "+lastName.getValue());
    }
    }

     
  • Tom M. Yeh

    Tom M. Yeh - 2009-06-10
    • summary: GenericComposer supports Serializable --> GenericComposer supports clustering (Serializable)
    • status: open --> closed
     
  • Marcos de Sousa

    Marcos de Sousa - 2009-06-10

    Tom,

    Why not serialize an composer by default?

    Looks like, if I want my application to be clustered in ZK it should be made alterations over it.

     
  • Tom M. Yeh

    Tom M. Yeh - 2009-06-11

    Agree, I made it as default.

    At the beginning I worried the incompatibility issue since developers won't declare transient. It will cause failure when trying to serialize it. After the second thought, it won't work actually without seializable -- it just doesn't dump error messages (but skip it).

     

Log in to post a comment.