<div dir="ltr">One thing is sure, when you have many JSF backing bean, you always end up implementing Seralizable all over the place or inject transient object. It would really simplify the code if Serialization was taken care by the container, without having to implement Seralizable.<div><br></div><div>Antonio</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 2, 2015 at 4:10 PM, Jozef Hartinger <span dir="ltr">&lt;<a href="mailto:jharting@redhat.com" target="_blank">jharting@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Can you elaborate? If a bean has a normal scope (passivating), it
    may need to be passivated. Are you talking about using a
    serialization tool that does not require objects to implement
    Serializable and using such tool to passivate a context?<span class="HOEnZb"><font color="#888888"><br>
    <br>
    Jozef</font></span><div><div class="h5"><br>
    <br>
    <div>On 02/01/2015 04:44 PM, Romain
      Manni-Bucau wrote:<br>
    </div>
    <blockquote type="cite">
      <p dir="ltr">Hi</p>
      <p dir="ltr">+1 to clarify it. All normal scope dont need
        Serializable constraint - even session scope - and it makes
        sense to not respect it in a lot of apps without preventing
        these beans to be serializable thans their proxies.</p>
      <p dir="ltr">Best IMO is to either remove it or to allow a scope
        serializer service to be specified to keep it portable.</p>
      <p dir="ltr">Wdyt?</p>
      <div class="gmail_quote">Le 1 févr. 2015 13:36, &quot;Antonio
        Goncalves&quot; &lt;<a href="mailto:antonio.goncalves@gmail.com" target="_blank">antonio.goncalves@gmail.com</a>&gt;
        a écrit :<br type="attribution">
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div dir="ltr">Hi all,
            <div><br>
            </div>
            <div>I was reading the CDI 1.2 spec and couldn&#39;t clearly
              find the way serialization and scopes work. The only
              explicit sentence I found was : </div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div>
              <div><i>1.3.1. JSF example</i></div>
              <div><i>The @SessionScoped annotation defined in Section
                  2.4.1, “Built-in scope types” is a scope<br>
                </i></div>
              <div><i>type that specifies the lifecycle of instances of
                  Login. <b>Managed beans with this scope must be</b></i></div>
              <div><i><b>serializable.</b></i></div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>The Weld documentation is a bit more explicit : </div>
              <div><br>
              </div>
              <div>
                <div><i>5.2. Built-in scopes</i></div>
                <div><i><b>Managed beans with scope @SessionScoped or
                      @ConversationScoped must be serializable</b>,
                    since the container passivates the HTTP session from
                    time to time.</i></div>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>And in the Java EE Tutorial we find (<a href="http://docs.oracle.com/javaee/6/tutorial/doc/gjbbk.html" target="_blank">http://docs.oracle.com/javaee/6/tutorial/doc/gjbbk.html</a>)
                : </div>
              <div><br>
              </div>
              <div><span><b><font color="#000000">Beans that use session, </font><font color="#ff0000">application</font><font color="#000000">, or conversation scope must be
                      serializable</font></b><font color="#000000">, but
                    beans that use request scope do not have to be
                    serializable.</font></span><br>
              </div>
              <div><span><br>
                </span></div>
              <div><span><br>
                </span></div>
              <div><span>This even made be
                  doubt about the application scope ?!?</span></div>
              <div><span><br>
                </span></div>
              <div><span><br>
                </span></div>
              <div><span>Any way, could we
                  clarify this in the CDI spec ?</span></div>
              <div><span><br>
                </span></div>
              <div><br>
              </div>
              -- <br>
              <div>
                <div dir="ltr">Antonio Goncalves <br>
                  Software architect, Java Champion and Pluralsight
                  author<br>
                  <br>
                  <a href="http://www.antoniogoncalves.org" target="_blank">Web site</a> | <a href="http://twitter.com/agoncal" target="_blank">Twitter</a>
                  | <a href="http://www.linkedin.com/in/agoncal" target="_blank">LinkedIn</a> | <a href="http://pluralsight.com/training/Authors/Details/antonio-goncalves" target="_blank">Pluralsight</a> | <a href="http://www.parisjug.org" target="_blank">Paris
                    JUG</a> | <a href="http://www.devoxx.fr" target="_blank">Devoxx
                    France</a></div>
              </div>
            </div>
          </div>
          <br>
          _______________________________________________<br>
          cdi-dev mailing list<br>
          <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
          <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
          <br>
          Note that for all code provided on this list, the provider
          licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>).
          For all other ideas provided on this list, the provider waives
          all patent and other intellectual property rights inherent in
          such information.<br>
        </blockquote>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
cdi-dev mailing list
<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a>

Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.</pre>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Antonio Goncalves <br>Software architect, Java Champion and Pluralsight author<br><br><a href="http://www.antoniogoncalves.org" target="_blank">Web site</a> | <a href="http://twitter.com/agoncal" target="_blank">Twitter</a> | <a href="http://www.linkedin.com/in/agoncal" target="_blank">LinkedIn</a> | <a href="http://pluralsight.com/training/Authors/Details/antonio-goncalves" target="_blank">Pluralsight</a> | <a href="http://www.parisjug.org" target="_blank">Paris JUG</a> | <a href="http://www.devoxx.fr" target="_blank">Devoxx France</a></div></div>
</div>