3 Replies Latest reply on Mar 9, 2009 8:38 PM by Pete Muir

    Serializable requirement isn't too strict?

    alberto Gori Novice

      In a session scoped bean I get error like

      The bean Session scoped simple bean 'userBean' org.jboss.webbeans.examples.prova.UserBean,  API types = [Object, UserBean, Serializable], binding types = [@Current] declares a 
      passivating scopes but has non-serializable dependencies

      The bean is:

      @SessionScoped @Named
      public class UserBean implements Serializable {
           @Fires Event<User> userEvents;
           @Current java.util.Logger logger

      I need to declare both fields as transient.
      Maybe this is ok for logger, but I don't think this is correct for the webbeans interface Event.

      This code as been tested on current trunk.

      About logger, I used the @Produces idiom. I think the problem is that scope is the dependent scope,  so it causes the logger to be a session logger and so needs to be serializable.
      Should I force 'produces' method to request scope?