<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><a 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 <trongtt@gmail.com> 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"><<a href="mailto:julien@julienviet.com" target="_blank">julien@julienviet.com</a>></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 PortalClusteredSSOSupportValve in Tomcat :-)<div>
<div><br><div><div>On Mar 18, 2013, at 5:14 PM, Marek Posolda <<a href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>> 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>
ValveBase portalClusteredSSOSupportValve;<br>
<br>
public void contextInitialized(ServletContextEvent sce) {<br>
<br>
if (new J2EEServerInfo().isJBoss()) {<br>
PortalClusteredSSOSupportValve casted =
(PortalClusteredSSOSupportValve)portalClusteredSSOSupportValve;<br>
// Do something with the valve<br>
}<br>
}<br>
<br>
public void contextDestroyed(ServletContextEvent sce) {<br>
}<br>
<br>
private ValveBase findValve() {<br>
// TODO: Find valve somehow...<br>
return null;<br>
}<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 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 href="mailto:trongtt@gmail.com" target="_blank">trongtt@gmail.com</a><br>
Twitter: <a 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></body></html>