[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3448) MultipartFilter does not begin parsing until after transaction is started

Clint Popetz (JIRA) jira-events at lists.jboss.org
Mon Sep 22 18:19:20 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBSEAM-3448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12430701#action_12430701 ] 

Clint Popetz commented on JBSEAM-3448:
--------------------------------------

A workaround, for those experiencing tx timeouts when uploading files, is to create this class:

@Scope(APPLICATION)
@Name("forceMultipartResolutionFilter")
@BypassInterceptors
@Filter(within="org.jboss.seam.web.multipartFilter")
public class ForceMultipartResolutionFilter extends AbstractFilter
{
	@Override
	public void doFilter(
			ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
	
		if (request instanceof MultipartRequest)
			request.getParameter("");
		chain.doFilter(request, response);
	}
}



> MultipartFilter does not begin parsing until after transaction is started
> -------------------------------------------------------------------------
>
>                 Key: JBSEAM-3448
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3448
>             Project: Seam
>          Issue Type: Bug
>            Reporter: Clint Popetz
>
> Currently the multipart filter creates the request wrapper upon detecting a multipart post, but does not actually begin processing until the first time someone asks it for a parameter.  This means that upon such a POST, multipart processing won't begin until after the transaction has been created by the SeamPhaseListener, and thus for large uploads (and/or slow network connections) it's very easy to exceed the transaction timeout, leading to failed uploads.
> I think that MultipartFilter should call getParam("") before invoking the rest of the chain so that the upload/parsing happen before the tx is created.

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

        



More information about the seam-issues mailing list