myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Weßendorf (JIRA) <>
Subject [jira] Commented: (TRINIDAD-1464) max upload size cannot be reconfigured after app is deployed
Date Fri, 01 May 2009 11:25:30 GMT


Matthias Weßendorf commented on TRINIDAD-1464:

One possible approach:
*create a new abstract class in the Trinidad API "FileUploadConfig"
and define abstract get/set methods for "maxMemory", "maxDiskSpace"
and "tempDir".

*every implementation of the UploadedFileProcessor that wants to change
the configuration during runtime should not only implement the actual
UploadedFileProcessor interface, it also has to implement the abstract
"FileUploadConfig" class. The UploadFileProcessorImpl (default) would
do that too.

*since the FileUploadConfig implementation is shared over all sessions
(application scoped), the implementor (e.g. the UploadFileProcessorImpl)
needs to be aware of writing thread-safety code, when *setting* the new value...

possible usage in an action-method:
FileUploadConfig fuc = null;
UploadedFileProcessor ufp = requestCtx.getUploadedFileProcessor();
if(ufp instanceof FileUploadConfig)
 fuc = (FileUploadConfig) ufp;

> max upload size cannot be reconfigured after app is deployed
> ------------------------------------------------------------
>                 Key: TRINIDAD-1464
>                 URL:
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>    Affects Versions:  1.2.11-core
>            Reporter: Matthias Weßendorf
>            Assignee: Matthias Weßendorf
> Currently the only way to configure the max upload size it to set context
> parameters in web.xml. Some container do not provide any support for changing
> web.xml during or after deployment...
> Applications needs to be able to change the max upload size after deployment.
> This could be done by providing an implementation of
> org.apache.myfaces.trinidad.webapp.UploadedFileProcessor. However that 
> would be a relatively simple variation on
> org.apache.myfaces.trinidadinternal.config.upload.UploadedFileProcessorImpl 
> We need to find a good way to dynamically change those configuration settings

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message