[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-790) Create a universal SeamFilter

Stuart Robertson (JIRA) jira-events at lists.jboss.org
Fri Feb 9 15:35:30 EST 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-790?page=comments#action_12352752 ] 
            
Stuart Robertson commented on JBSEAM-790:
-----------------------------------------

Hi Shane.  Sure.  The example I included above for instance, is for an application which is supposed to only be available during extended working hours in production.  During development though, we may not want that filter to actually impose this restriction.  A similar use case comes up with a filter that enforces that a user is logged on before accessing an application.  Or a filter that captures timings for requests.  

In each case it is very nice to have Seam manage these components.  Beyond DI, having Seam decide which filter implementation is actually delegated to means you can vary your filter implementations without touching web.xml.  

So your components.xml for dev, test and prod would specify implementations for each named filter.  Web.xml would specify a DelegatingFilterProxy, supplied by Seam, which would delegate to a real filter based on the targetFilter parameter specified in web.xml.  In practice, during development, when a filter's functionality isn't needed at a particular phase you could let seam inject a PassThrough filter (no-op, etc.).  Or a filter that does an implicit logon.

Is this enough to make it clear?  To me it's nice-to-have flexibility.  Not critical, but we've found that the pattern is quite simple in practice, and has been useful. 

> Create a universal SeamFilter
> -----------------------------
>
>                 Key: JBSEAM-790
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-790
>             Project: JBoss Seam
>          Issue Type: Feature Request
>          Components: Core
>    Affects Versions: 1.1.6.GA
>            Reporter: Shane Bryzak
>         Assigned To: Shane Bryzak
>            Priority: Minor
>             Fix For: 1.1.7.GA
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> In an average Seam application we may use some or all of the following filters, which may grow to even more over time:
> SeamRedirectFilter
> SeamExceptionFilter
> SeamMultipartFilter
> SeamServletFilter
> It would be nice to be able to configure a single master filter, SeamFilter, which wraps all of these filters.  We could possibly even make each of these filters application-scoped components, meaning they could be configured via components.xml instead of in web.xml.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list