[gatein-dev] PortalClusteredSSOSupportValve issue in Tomcat
Julien Viet
julien at julienviet.com
Wed Mar 27 09:57:15 EDT 2013
thank you very much!
On Mar 27, 2013, at 2:47 PM, Marek Posolda <mposolda at redhat.com> wrote:
> Done. Fix is merged into master and 3.5.x branch.
>
> Thanks,
> Marek
>
> On 27/03/13 08:46, Julien Viet wrote:
>> yes please!
>>
>> On Mar 27, 2013, at 8:44 AM, Marek Posolda <mposolda at redhat.com> wrote:
>>
>>> Thanks for confirmation. I've sent PR here https://github.com/gatein/gatein-portal/pull/362 . Do you want this to be fixed in both GateIn master and 3.5.x branch?
>>>
>>> Thanks,
>>> Marek
>>>
>>> On 26/03/13 12:26, Sơn Trần wrote:
>>>> I have tested branch 'sso-valve' of Marek Posolda. It worked fine for Tomcat version 7.32 and PortalClusteredSSOSupportValve wasn't available on classpath with Tomcat packaging.
>>>>
>>>> 2013/3/26 Son Trong Tran <sontt at exoplatform.com>
>>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: Trong Tran <trongtt at gmail.com>
>>>> Date: Tue, Mar 26, 2013 at 9:42 AM
>>>> Subject: Fwd: [gatein-dev] PortalClusteredSSOSupportValve issue in Tomcat
>>>> To: sontt at exoplatform.com
>>>>
>>>>
>>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: Marek Posolda <mposolda at redhat.com>
>>>> Date: 25 March 2013 20:33
>>>> Subject: Re: [gatein-dev] PortalClusteredSSOSupportValve issue in Tomcat
>>>> To: Julien Viet <julien at julienviet.com>
>>>> Cc: Trong Tran <trongtt at gmail.com>, "gatein-dev at lists.jboss.org" <gatein-dev at lists.jboss.org>
>>>>
>>>>
>>>> I've created jira https://issues.jboss.org/browse/GTNPORTAL-2859 and I have fix available in branch https://github.com/mposolda/gatein-portal/tree/sso-valve . It's adding new module security-jboss, which is deployed only in JBoss but on Tomcat. So PortalClusteredSSOSupportValve is not available on classpath on Tomcat anymore.
>>>>
>>>> Could you please check it with your Spring application? I will send PR once confirmed from you that it works.
>>>>
>>>> Thanks,
>>>> Marek
>>>>
>>>>
>>>> On 19/03/13 08:22, Julien Viet wrote:
>>>>> http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch04s12.html
>>>>>
>>>>> On Mar 19, 2013, at 4:29 AM, Trong Tran <trongtt at gmail.com> wrote:
>>>>>
>>>>>> Yes, that was just a way to reproduce the issue.
>>>>>>
>>>>>> 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.
>>>>>>
>>>>>> On 18 March 2013 23:28, Julien Viet <julien at julienviet.com> wrote:
>>>>>> I think it was just a way to reproduce the issue and Trong does not want to use the PortalClusteredSSOSupportValve in Tomcat :-)
>>>>>>
>>>>>> On Mar 18, 2013, at 5:14 PM, Marek Posolda <mposolda at redhat.com> wrote:
>>>>>>
>>>>>>> Hi Trong,
>>>>>>>
>>>>>>> Notes inline.
>>>>>>>
>>>>>>> On 18/03/13 12:25, Trong Tran wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> 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.
>>>>>>> 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.
>>>>>>>
>>>>>>> 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...
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I am able to have listener on Tomcat with code like this and it works without throwing error:
>>>>>>>
>>>>>>> public class PortalSSOValveListener implements ServletContextListener {
>>>>>>>
>>>>>>> ValveBase portalClusteredSSOSupportValve;
>>>>>>>
>>>>>>> public void contextInitialized(ServletContextEvent sce) {
>>>>>>>
>>>>>>> if (new J2EEServerInfo().isJBoss()) {
>>>>>>> PortalClusteredSSOSupportValve casted = (PortalClusteredSSOSupportValve)portalClusteredSSOSupportValve;
>>>>>>> // Do something with the valve
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> public void contextDestroyed(ServletContextEvent sce) {
>>>>>>> }
>>>>>>>
>>>>>>> private ValveBase findValve() {
>>>>>>> // TODO: Find valve somehow...
>>>>>>> return null;
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>>>
>>>>>>>> I can see that it has been changed in org.apache.catalina.valves.ValveBase since Tomcat API 7.0 which already defined a final start() method from its indirect parent class org.apache.catalina.util.LifecycleBase
>>>>>>>> http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/ValveBase.html
>>>>>>>>
>>>>>>>> I confirmed that the problem doesn't happen in JBoss, so I guess this api part is not consistent between Tomcat and JBossWeb.
>>>>>>> yes, It sucks that this api is changed...
>>>>>>>>
>>>>>>>> In addition, there is no error in compile time as it is using tomcat catalina version 6.0.29 declared in gatein-dep.
>>>>>>> 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.
>>>>>>>
>>>>>>> Marek
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Trong Tran
>>>>>> (+84) 983841909 | trongtt at gmail.com
>>>>>> Twitter: http://twitter.com/trongtt
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Trong Tran
>>>> (+84) 983841909 | trongtt at gmail.com
>>>> Twitter: http://twitter.com/trongtt
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> gatein-dev mailing list
>>>> gatein-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/gatein-dev
>>>
>>> _______________________________________________
>>> gatein-dev mailing list
>>> gatein-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/gatein-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/gatein-dev/attachments/20130327/93d8c6b2/attachment-0001.html
More information about the gatein-dev
mailing list