[ http://issues.apache.org/jira/browse/GERONIMO-1705?page=all ]
Paul McMahan updated GERONIMO-1705:
-----------------------------------
Attachment: GERONIMO-1705.patch
downloadProgress2.png
Attaching a patch that provides an AJAX enabled progress bar on the JDBC driver
download page. See the attached screenshot (downloadProgress.2png) for a
preview.
The progress bar is implemented as follows :
When the download form in the selectDownload.jsp portlet is submitted a request
is sent to the console application to begin downloading the driver from the
remote location (this is unchanged). An object on the server (i.e.
DownloadInfo) is updated while the download progresses and is stored in the
portlet's session. An onsubmit javascript listener attached to the download
form periodically accesses the server via DWR to query the download progress
stored in the DownloadInfo object. This javascript uses DHTML to update a
progress bar underneath the form as the download progresses. If the remote
server provides the total download size (some don't, e.g. postgres) then the
progress bar shows % complete. Otherwise it just shows total Kb downoaded. As
before, when the download completes the user is returned to the parameter
collection screen.
Note:
1.) As mentioned above a session object is used to pass information between
the download portlet and the DWR servlet. The JSR 168 Portlet Specification
(PLT.15.4) states that Portlets are supposed to be able to communicate
information with other Servlets and JSPs that are part of the same Portlet
Application via their session. Pluto running on Jetty passes the information as
expected but Pluto running on tomcat does not. The workaround provided by
tomcat is to set "emptySessionPath=true" on the web container. However, IMHO
this workaround is not acceptable because it is a server-wide setting that
forces all webapps deployed in G to share the same context for their sessions
("/"). i.e. the console should not require a specialized configuration of the
web container, especially one like this which could affect cross-context
security and complicate session usage. Therefore, the best alternative is to
tunnel requests for the DWR servlet through a servlet in the portal
application. Turns out that this was the exact approach taken in the patch
provided for GERONIMO-973 where the security context established by the
console-framework application is passed to the console-standard application via
such a tunnel. Therefore the patch attached to GERONIMO-973 is a prerequisite
of this patch. My understanding was that GERONIMO-973 would be applied at some
point in the future - if that's not the case then I can attach the relevant
parts of it to this JIRA. See the following JIRA for more information about
this limitation in tomcat: http://issues.apache.org/jira/browse/PLUTO-53
2.) If this approach for providing progress indication is found acceptable
then it can be readily adapted to work in other parts of the console as well,
such as uploading applications or the recently added feature for downloading
configurations.
3.) While downloading the jar the Next and Cancel buttons are disabled. If we
want to leave these buttons enabled during the download then the code running
on the server should be enhanced to support interrupted downloads (not hard to
do, just didn't want to overload the first iteration of this new function).
4.) There are various existing issues in the database pool portlet that are
not addressed by this patch (errors from download timeouts, error if file
already exists in repository, etc). Again, didn't want to overload this patch
so we can address those issues in a separate JIRA.
> Use AJAX to provide for a progress bar when downloading a JDBC jar
> ------------------------------------------------------------------
>
> Key: GERONIMO-1705
> URL: http://issues.apache.org/jira/browse/GERONIMO-1705
> Project: Geronimo
> Type: Improvement
> Components: console
> Versions: 1.0
> Reporter: Jeff Genender
> Attachments: GERONIMO-1705.patch, downloadProgress2.png
>
> Use AJAX to provide for a progress bar when downloading a JDBC jar for the
> Download Drivers portlet. As it stands, for people who have slower
> connections, it currently can make them think something is wrong with
> Geronimo because web page refresh takes too long. A progrss bar using AJAX
> can help keep the user up to date on the downloading progress.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira