[ 
https://issues.apache.org/jira/browse/FELIX-4734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Valentin Valchev updated FELIX-4734:
------------------------------------
    Attachment: FELIX-4734.patch

I'm attaching a patch that:
- removes all unnecessary waits
- always waits for refresh package to complete
  -- at most 5 seconds for a single bundle packages refresh
  -- at most 15 seconds for the whole framework packages refresh
- it doesn't uses the wiring, since I'm trying to keep webconsole OSGi 4.0 
compliant

I didn't make update to do refresh packages. Considering that web console is 
developer tool, for me it's better to update the bundle(s) I need, and then to 
refresh the packages. 


Looking forward for your review.

> Web Console RESTful API should wait for asynchonous operations until they 
> complete 
> -----------------------------------------------------------------------------------
>
>                 Key: FELIX-4734
>                 URL: https://issues.apache.org/jira/browse/FELIX-4734
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>    Affects Versions: webconsole-4.2.4
>            Reporter: Konrad Windszus
>         Attachments: FELIX-4734.patch
>
>
> Currently the RESTful API 
> (http://felix.apache.org/documentation/subprojects/apache-felix-web-console/web-console-restful-api.html)
>  adds a delay of 800ms to the response to give the asynchronous operations 
> enough time to complete successfully 
> (https://github.com/apache/felix/blob/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java#L412).
> Instead the according listeners should be used which are notified upon 
> completion of an asynchronous task.
> For {{refresh}} {{FrameworkWiring.refreshBundles}} can be used 
> (http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/wiring/FrameworkWiring.html#refreshBundles%28java.util.Collection,%20org.osgi.framework.FrameworkListener...%29).
>  A similar approach should be used for the other actions like uninstall, 
> install, update, start, stop, ...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to