myfaces-dev mailing list archives

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


Kentaro Kinebuchi commented on TRINIDAD-2293:

Recall that in multi file upload each file upload is a separate request. Ditto for chunked
file transfer, each chunk is a separate request. We store the files & chunks in the session
until the user submits the form.
This fix handles the scenario where lets say we have files A and B. The user add A and uploads
it. It's a huge file so it takes 1 hr and the progress bar goes to 100% and finishes. Next,
the user decides to add another file B. However, before he starts the upload the server fails
and failover puts him on another server where his session is replicated. He adds B, the file
is uploaded and then he submits the form. Without this HA fix he will see an upload failure
for file A while file B will be ok. This means that not only will he have to spend another
1 hr uploading A again even though it was previously uploaded successfully and is available
in the temporary directory on the server, he'll also be confused that the upload came back
as Failed even though he saw it upload successfully earlier.

We have to call setAttribute instead of getSessionMap().put because WLS only monitors calls
to the setAttribute method:

See the section "Use setAttribute to Change Session State"

> 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