You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Jeff Genender (JIRA)" <de...@geronimo.apache.org> on 2006/03/07 14:44:38 UTC

[jira] Created: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

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


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


Re: [jira] Commented: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

Posted by Paul McMahan <pa...@gmail.com>.
Sorry about that, forgot to svn add the new classes (DownloadInfo and
DownloadMonitor) before generating the patch.  Attaching the needed
classes to this email (they're small) plus I will attach a new patch
to GERONIMO-1705 for accountability.

Best wishes,
Paul

On 3/27/06, Jeff Genender (JIRA) <de...@geronimo.apache.org> wrote:
>     [ http://issues.apache.org/jira/browse/GERONIMO-1705?page=comments#action_12372016 ]
>
> Jeff Genender commented on GERONIMO-1705:
> -----------------------------------------
>
> This doesn't compile.  It refers to DownloadInfo (line 120 in DriverDownloader.java) and this class is knowhere to be found.
>
> > 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
>
>

[jira] Resolved: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

Posted by "Paul McMahan (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1705?page=all ]
     
Paul McMahan resolved GERONIMO-1705:
------------------------------------

    Resolution: Fixed

> 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
>     Assignee: Paul McMahan
>      Fix For: 1.2
>  Attachments: GERONIMO-1705.patch, 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


[jira] Closed: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

Posted by "Jeff Genender (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1705?page=all ]
     
Jeff Genender closed GERONIMO-1705:
-----------------------------------

    Fix Version: 1.2
     Resolution: Fixed

Great work...this is awesome stuff.

Sending        applications/console-framework/project.xml
Adding         applications/console-framework/src/java
Adding         applications/console-framework/src/java/org
Adding         applications/console-framework/src/java/org/apache
Adding         applications/console-framework/src/java/org/apache/geronimo
Adding         applications/console-framework/src/java/org/apache/geronimo/console
Adding         applications/console-framework/src/java/org/apache/geronimo/console/servlet
Adding         applications/console-framework/src/java/org/apache/geronimo/console/servlet/ContextForwardServlet.java
Sending        applications/console-framework/src/webapp/WEB-INF/web.xml
Sending        applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
Adding         applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DownloadInfo.java
Adding         applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DownloadMonitor.java
Sending        applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DriverDownloader.java
Adding         applications/console-standard/src/java/org/apache/geronimo/console/servlet
Adding         applications/console-standard/src/java/org/apache/geronimo/console/servlet/ForwardDispatchFilter.java
Sending        applications/console-standard/src/webapp/WEB-INF/dwr.xml
Sending        applications/console-standard/src/webapp/WEB-INF/view/dbwizard/selectDownload.jsp
Sending        applications/console-standard/src/webapp/WEB-INF/view/infomanager/svrInfoNormal.jsp
Sending        applications/console-standard/src/webapp/WEB-INF/web.xml
Sending        configs/console-jetty/src/plan/plan.xml
Sending        configs/console-tomcat/src/plan/plan.xml
Transmitting file data ..............
Committed revision 389296.


> 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
>      Fix For: 1.2
>  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


[jira] Reopened: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

Posted by "Paul McMahan (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1705?page=all ]
     
Paul McMahan reopened GERONIMO-1705:
------------------------------------

     Assign To: Paul McMahan

reopening so I can attach the corrected patch (for accounting purposes)

> 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
>     Assignee: Paul McMahan
>      Fix For: 1.2
>  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


[jira] Updated: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

Posted by "Paul McMahan (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1705?page=all ]

Paul McMahan updated GERONIMO-1705:
-----------------------------------

    Attachment: GERONIMO-1705.patch

> 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
>     Assignee: Paul McMahan
>      Fix For: 1.2
>  Attachments: GERONIMO-1705.patch, 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


[jira] Commented: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

Posted by "Aaron Mulder (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-1705?page=comments#action_12369254 ] 

Aaron Mulder commented on GERONIMO-1705:
----------------------------------------

Oops.  Then the initial call could return the file ID and the AJAX client could pass in the file ID and the AJAX server could read out of the static hashmap.  Is that kind of what you had in mind?

> 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

>
> 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


[jira] Updated: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

Posted by "Paul McMahan (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1705?page=all ]

Paul McMahan updated GERONIMO-1705:
-----------------------------------

    Patch Info: [Patch Available]

> 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


[jira] Commented: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

Posted by "Jeff Genender (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-1705?page=comments#action_12369325 ] 

Jeff Genender commented on GERONIMO-1705:
-----------------------------------------

Yep..you are on the track...

I see you launching a background task from the servlet, in a static Hashmap that has an ID, and the ID comes back to the browser on the first call.  The browser can then poll the task with that ID through the servlet to get a completed % upon querying the task.

Here is a great link on the design:

https://bpcatalog.dev.java.net/nonav/ajax/progress-bar/

and here is some code to get an idea on a possible way to do it:

https://bpcatalog.dev.java.net/source/browse/bpcatalog/ws/ajax/progress-bar/

> 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

>
> 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


[jira] Closed: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

Posted by "Vamsavardhana Reddy (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1705?page=all ]

Vamsavardhana Reddy closed GERONIMO-1705.
-----------------------------------------


> 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
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: console
>    Affects Versions: 1.0
>            Reporter: Jeff Genender
>         Assigned To: Paul McMahan
>             Fix For: 1.2
>
>         Attachments: downloadProgress2.png, GERONIMO-1705.patch, GERONIMO-1705.patch
>
>
> 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

        

[jira] Commented: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

Posted by "Aaron Mulder (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-1705?page=comments#action_12369253 ] 

Aaron Mulder commented on GERONIMO-1705:
----------------------------------------

How do you recommend we run the download and store the progress?  There has to be some kind of background thread doing the download and putting the progress into a variable that the UI can see.  I suppose we could use a JMS consumer to do the download, and have a static hashmap with the key as some kind of file ID and the value as the progress percent.  Then the 

> 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

>
> 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


[jira] Updated: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

Posted by "Paul McMahan (JIRA)" <de...@geronimo.apache.org>.
     [ 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


[jira] Commented: (GERONIMO-1705) Use AJAX to provide for a progress bar when downloading a JDBC jar

Posted by "Jeff Genender (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-1705?page=comments#action_12372016 ] 

Jeff Genender commented on GERONIMO-1705:
-----------------------------------------

This doesn't compile.  It refers to DownloadInfo (line 120 in DriverDownloader.java) and this class is knowhere to be found.

> 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