<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    What happens if you use a newer version of tomcat ?<br>
    <br>
    <div class="moz-cite-prefix">On 03/19/2013 03:22 AM, Julien Viet
      wrote:<br>
    </div>
    <blockquote
      cite="mid:957D0151-08AC-4C2F-8560-EF697FE98412@julienviet.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <a moz-do-not-send="true"
href="http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch04s12.html">http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch04s12.html</a>
      <div><br>
        <div>
          <div>On Mar 19, 2013, at 4:29 AM, Trong Tran
            <a class="moz-txt-link-rfc2396E" href="mailto:trongtt@gmail.com">&lt;trongtt@gmail.com&gt;</a> wrote:</div>
          <br class="Apple-interchange-newline">
          <blockquote type="cite">Yes, that was just a way to reproduce
            the issue.<br>
            <br>
            About the real usecase that Hoang has reported, it is a
            Spring 3.x web app. For a certain reason, Spring auto scans
            all Valves which causes the issue.<br>
            <br>
            <div class="gmail_quote">
              On 18 March 2013 23:28, Julien Viet <span dir="ltr">&lt;<a
                  moz-do-not-send="true"
                  href="mailto:julien@julienviet.com" target="_blank">julien@julienviet.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 style="word-wrap:break-word">I think it was just a
                  way to reproduce the issue and Trong does not want to
                  use the&nbsp;PortalClusteredSSOSupportValve in Tomcat :-)
                  <div>
                    <div><br>
                      <div>
                        <div>On Mar 18, 2013, at 5:14 PM, Marek Posolda
                          &lt;<a moz-do-not-send="true"
                            href="mailto:mposolda@redhat.com"
                            target="_blank">mposolda@redhat.com</a>&gt;
                          wrote:</div>
                        <br>
                        <blockquote type="cite">
                          <div text="#000000" bgcolor="#FFFFFF">
                            <div>Hi Trong,<br>
                              <br>
                              Notes inline.<br>
                              <br>
                              On 18/03/13 12:25, Trong Tran wrote:<br>
                            </div>
                            <blockquote type="cite">Hi,<br>
                              <br>
                              We can easily reproduce the problem in
                              Tomcat by just reference the
                              PortalClusteredSSOSupportValve class in a
                              Servlet Context listener of a web app, to
                              load it.<br>
                            </blockquote>
                            yes, I am able to reproduce it with Servlet
                            Context listener. But I am still not sure if
                            I understand the usecase. Why you need to
                            access PortalClusteredSSOSupportValve from
                            some Servlet Context listener on Tomcat?
                            Thing is that PortalClusteredSSOSupportValve
                            is meant to be used only in JBoss because it
                            uses JBoss specific clustered SSO valve. It
                            does not makes sense to use it in Tomcat.<br>
                            <br>
                            And it seems that moving
                            PortalClusteredSSOSupportValve to
                            packaging/jboss7 won't solve your issue,
                            because than you won't be able to compile
                            your listener anyway because
                            PortalClusteredSSOSupportValve won't be
                            available. But maybe I still don't uderstand
                            the usecase...<br>
                            <br>
                            <br>
                            <br>
                            I am able to have listener on Tomcat with
                            code like this and it works without throwing
                            error:<br>
                            <br>
                            public class PortalSSOValveListener
                            implements ServletContextListener {<br>
                            <br>
                            &nbsp;&nbsp;&nbsp; ValveBase
                            portalClusteredSSOSupportValve;<br>
                            &nbsp;&nbsp;&nbsp; <br>
                            &nbsp;&nbsp;&nbsp; public void
                            contextInitialized(ServletContextEvent sce)
                            {<br>
                            <br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (new J2EEServerInfo().isJBoss())
                            {<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PortalClusteredSSOSupportValve
                            casted =
                            (PortalClusteredSSOSupportValve)portalClusteredSSOSupportValve;<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Do something with the valve<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
                            &nbsp;&nbsp;&nbsp; }<br>
                            &nbsp;&nbsp; <br>
                            &nbsp;&nbsp;&nbsp; public void
                            contextDestroyed(ServletContextEvent sce) {<br>
                            &nbsp;&nbsp;&nbsp; }<br>
                            <br>
                            &nbsp;&nbsp;&nbsp; private ValveBase findValve() {<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // TODO: Find valve somehow...<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return null;<br>
                            &nbsp;&nbsp;&nbsp; }<br>
                            }<br>
                            <br>
                            <blockquote type="cite"><br>
                              I can see that it has been changed in
                              org.apache.catalina.valves.ValveBase since
                              Tomcat API 7.0 which already defined a
                              final <b>start()</b> method from its
                              indirect parent class
                              org.apache.catalina.util.LifecycleBase<br>
                              <a moz-do-not-send="true"
href="http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/ValveBase.html"
                                target="_blank">http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/ValveBase.html</a><br>
                              <br>
                              I confirmed that the problem doesn't
                              happen in JBoss, so I guess this api part
                              is not consistent between Tomcat and
                              JBossWeb.<br>
                            </blockquote>
                            yes, It sucks that this api is changed...<br>
                            <blockquote type="cite"> <br>
                              In addition, there is no error in compile
                              time as it is using tomcat catalina
                              version 6.0.29 declared in gatein-dep.<br>
                            </blockquote>
                            Hmm... I tried to run "mvn dependency:tree"
                            in module component/web/security where
                            PortalClusteredSSOSupportValve currently is.
                            And I am seeing that it's using
                            jboss.web:jbossweb:jar:2.1.3.GA:provided for
                            compilation.<br>
                            <br>
                            Marek<br>
                            <blockquote type="cite"><br>
                              Thanks,<br>
                            </blockquote>
                            <br>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
            <br>
            <br clear="all">
            <br>
            -- <br>
            <font><b>Trong Tran</b></font><br
              style="color:rgb(102,102,102);font-family:'trebuchet
              ms',sans-serif">
            <span style="color:rgb(102,102,102);font-family:'trebuchet
              ms',sans-serif"></span><span
              style="color:rgb(102,102,102);font-family:'trebuchet
              ms',sans-serif"><i><span
                  style="color:rgb(102,102,102);font-family:'trebuchet
                  ms',sans-serif">(+84) 983841909 <span
                    style="color:rgb(255,153,0)">|</span></span> </i></span><span
              style="font-family:'trebuchet ms',sans-serif"><span
                style="color:rgb(102,102,102)"><a moz-do-not-send="true"
                  href="mailto:trongtt@gmail.com" target="_blank">trongtt@gmail.com</a><br>
                Twitter: <a moz-do-not-send="true"
                  href="http://twitter.com/trongtt" target="_blank">http://twitter.com/trongtt</a></span></span><span
              style="font-family:'trebuchet ms',sans-serif"><span
                style="color:rgb(102,102,102)"><span><span
                    style="color:rgb(102,102,102);font-family:'trebuchet
                    ms',sans-serif"><i><span
                        style="color:rgb(255,153,0)"></span></i></span></span></span></span><span
              style="font-family:'trebuchet ms',sans-serif"></span>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gatein-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gatein-dev@lists.jboss.org">gatein-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/gatein-dev">https://lists.jboss.org/mailman/listinfo/gatein-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>