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

Stuart Robertson (JIRA) jira-events at jboss.com
Thu Feb 8 10:43:30 EST 2007


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

I like your second option, making the filters into components.  Not only does it let Seam manage the filters, it could also let you configure seam to make certain filters pass-thru in certain configurations.  For instance authentication enforcement or instrumentation may only be wanted sometimes.  I really like Spring's mechanism for this in http://www.springframework.org/docs/api/org/springframework/web/filter/DelegatingFilterProxy.html.  Here's how we use it:

In web.xml:

	<filter>
		<display-name>Site Availability Filter</display-name>
		<filter-name>Site Availability Filter</filter-name>
		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
		<init-param>
			<param-name>targetBeanName</param-name>
			<param-value>siteAvailabilityFilter</param-value>
		</init-param>
	</filter>

targetBeanName specifies the bean that will be proxied, and of course it's managed.  So going this route, the filter would first be defined as a Seam component and specied as the targetBeanName.

Anyway, I thought it might be useful to see another implementation with what sounds to be similar goals as you think through how you might implement this feature.

> 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