1 Reply Latest reply on Jan 17, 2017 2:11 AM by tremes

    How disable seriliazation of injected fields in SessionScoped class

    mfatih

      Hi all,

      I am trying to move standalone web application to cluster. SessionScoped classes should be implement serializable as known and i have @SessionScoped class which has users roles,permissions and manager classes.

      The role list attribute should be serialized but there is no need to injected fields serialization.  Those injected attributes(not SessionScoped) should be created by weld again during replication on another cluster node.

      Is there any configuration in weld which disables injected fields serialization

       

      @SessionScoped

      public class MyIdentity implements Serializable {

       

      @Inject

      JSMenuConstructor menuManager;

       

      EJB

      IdentityManager identityManager

       

      List<Role> roleList ;

      List<Permission> permissionList ;

      ....

      ...

           public boolean login(String userName, String password){

                   ......

           }

      }