[jboss-jira] [JBoss JIRA] (WFLY-4185) Using annotated servlet listeners from modules

Stuart Douglas (JIRA) issues at jboss.org
Mon Dec 22 22:31:29 EST 2014


    [ https://issues.jboss.org/browse/WFLY-4185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029336#comment-13029336 ] 

Stuart Douglas commented on WFLY-4185:
--------------------------------------

I just tested this against EAP upstream and it seems to be picking up the listener from modules (I just cherry picked your test case into EAP). 

> Using annotated servlet listeners from modules
> ----------------------------------------------
>
>                 Key: WFLY-4185
>                 URL: https://issues.jboss.org/browse/WFLY-4185
>             Project: WildFly
>          Issue Type: Bug
>          Components: EE
>    Affects Versions: 9.0.0.Alpha1
>            Reporter: Pedro Igor
>            Assignee: Stuart Douglas
>
> PicketLink provides support for Http Security. Basically, it consists of an API to define security policies to the paths or resources of an application and a security filter (servlet filter) that is responsible to enforce those policies for every single request.
> The security filter is installed from a specific ServletContextListener (org.picketlink.http.internal.PicketLinkServletContextListener) that checks if the application has defined any security policy in order to decide if the filter must be installed or not.
> PicketLink also defines a ServletRequestListener (org.picketlink.http.internal.HttpServletRequestListener) that is used to produce a decorated HttpServletRequest instance. This decorated instance provides full integration between PL and the HttpServletRequest security methods plus some other goodies for PL users such as URL rewriting, etc.
> Both listeners (servletcontext and request) are CDI beans with injection points and/or producer methods. 
> When using PL from modules, the producer method of org.picketlink.http.internal.HttpServletRequestListener#produce is not being recognized. And that makes impossible to use PL from modules.
> The same code works if you use PL jars inside the deployment.
> Another interesting behavior is that EAP and WildFly are behaving differently. In EAP (latest build), the ServletContextListener is only recognized as a CDI bean if you define it in the web.xml. While in WildFly this is not necessary.
> Also, in EAP the producer method of HttpServletRequestListener is properly recognized and everything works fine.
> I've created a branch [1] to test this issue. The test case is {code}org.wildfly.test.integration.security.picketlink.core.http.ServletListenerFromModuleTestCase{code}.
> [1] https://github.com/pedroigor/wildfly/tree/WFLY-4185



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jboss-jira mailing list