[ 
https://issues.apache.org/jira/browse/ARIES-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888531#action_12888531
 ] 

Bartosz Kowalewski commented on ARIES-355:
------------------------------------------

Hi Jarek,

I thought that the implementation that I saw in Equinox some time ago used a 
service tracker and searched for a reference to a handler for a specific 
protocol when the given protocol was needed for the first time. If this 
protocol had already been used, the handler should be returned from some kind 
of a cache. It it is so, the previous way of verifying that the 'webbundle' 
protocol handler is ready to be used, would also work. 
However, I don't know how it is implemented in Felix. I also agree that your 
approach is much safer and does not make any assumptions about the impl of 
URLStreamHandlerFactory (it does not make any difference whether it is Equinox, 
Felix or a different container).

Best regards,
  Bartek

> Web itests - clean-up
> ---------------------
>
>                 Key: ARIES-355
>                 URL: https://issues.apache.org/jira/browse/ARIES-355
>             Project: Aries
>          Issue Type: Improvement
>          Components: Web
>    Affects Versions: 0.2
>            Reporter: Bartosz Kowalewski
>            Assignee: Jarek Gawor
>             Fix For: 0.2
>
>         Attachments: aries-355.patch
>
>
> I've applied some minor changes to the WabConverterITest class. I took a look 
> at this class after seeing logs from build #580 (WabConverterITest failed in 
> #580).However, the changes I propose are not really related with the issue 
> observed in #580 - they are rather meant to do clean up.
> In order to get rid of the issue observed in #580 it might be necessary to 
> increase the amount of time this test waits for the WAR URL Stream Handler 
> Service.  TIt currently waits 10 seconds. I guess this could be increased to 
> 15 seconds:
>  URLStreamHandlerService warHandler = 
> getOsgiService(URLStreamHandlerService.class, 
>       "(url.handler.protocol=webbundle)", 15000);
> or even to the default timeout which is 30 seconds.
> Changes that applied in the patch
> 1. fout.close() added
> 2. Service tracker references kept and closed during test teardown
> 3. Service tracker used instead of bundleContext.getServiceReferences()
> 4. There's no need to check urlhandler bundle state. Checking if the WAR URL 
> Stream Handler Service is present should be sufficient.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to