myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Blake Sullivan (JIRA)" <>
Subject [jira] [Commented] (TRINIDAD-2293) multi file upload does not get replicated in a High Availability environment
Date Mon, 23 Jul 2012 17:21:35 GMT


Blake Sullivan commented on TRINIDAD-2293:

There must be something that I am missing because this seems to be solving a problem that
does not exist.  If I understand things correctly, we only hang onto the uploaded bytes for
the duration of the request.  If that is the case, then the only case in which we will lose
data is if the VM dies during a request.  Fail over does not do anything if the server goes
down during an in-flight request--the session information is only copied at the end of the
request (at the earliest).

Similar issues apply to the handling of the temporary file--we shouldn't worry about trying
to copy the location over because the user is supposed to retry if the request fails.

Also, why are we storing any of this information in the Session?  This would seem to cause
race conditions

If we were going to make UploadedFiles Serializable, we would need a serialVersionUID

Why would we be using this code:

((HttpServletRequest) externalContext.getRequest()).getSession().setAttribute(UploadedFiles.UPLOADED_FILES_KEY,

Instead of this code:

externalContext.getSessionMap().put(UploadedFiles.UPLOADED_FILES_KEY, sessionFiles);

> multi file upload does not get replicated in a High Availability environment
> ----------------------------------------------------------------------------
>                 Key: TRINIDAD-2293
>                 URL:
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Infrastructure
>    Affects Versions: 2.0.2-core
>         Environment: linux x86
>            Reporter: Kentaro Kinebuchi
>         Attachments: Trinidad-2293.patch
> In multi file upload, the uploaded files are stored in the user's session before submit.
In a HA environment, the session context which is replicated does not contain this file information
so if the server goes down then the file data is lost in the replicated server.
> There are two specific issues which need to be handled in the code:
> 1. In WebLogic, unless the setAttribute() method is called on the session context, that
attribute is not automatically replicated. Hence, all attributes which are updated during
multi file upload and we want replicated have to specifically call that method.
> 2. WebLogic does not replicate all File objects stored in the context. Hence, the path
to the temporary file created for each uploaded file needs to be saved in a String in the
context so it is replicated.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message