Hi Pavel,

I bet it's due to the pax-url-aether: it waits the mvn resolution timeout (even if it's not a mvn URL) before "falling" back to http or file URL.

Let me check if we can improve that.

Regards
JB

On 02/07/2014 09:48 AM, Pavel Ilyushko wrote:
Hello,

I'm a new user of Karaf and recently I've upgraded from Karaf 2.2.8 to 3.0.0
(running with JDK jdk1.7.0_17 on Windows).

I've noticed that in the new Karaf there's a ~ 30 seconds delay (timeout)
when installing features using file: or http: protocol, even though using
mvn: protocol works fast.

To make a clean test, I've unzipped Karaf 3.0.0 and then added the following
feature repo:

<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"; name="test">
   <feature name="testFeature" version="1.0.0">

<bundle>mvn:org.apache.servicemix.nmr/org.apache.servicemix.nmr.api/1.0.0-m2</bundle>
   </feature>
</features>

installing the feature using mvn: protocol is fast.

however, both:

file:/d:/temp/org.apache.servicemix.nmr.api-1.0.0-m2.jar

and

http://repo1.maven.org/maven2/org/apache/servicemix/nmr/org.apache.servicemix.nmr.api/1.0.0-m2/org.apache.servicemix.nmr.api-1.0.0-m2.jar

take the feature at least 30 seconds to install.

I've had a look at the BundleManager class'
(https://apache.googlesource.com/karaf/+/trunk/features/core/src/main/java/org/apache/karaf/features/internal/BundleManager.java),

private void waitForUrlHandler(String protocol) method, and saw a wait call
there:

urlHandlerTracker.waitForService(30000);

This could be the reason of the delay for the file: and http: protocols.

Is there a way to avoid this delay (as with the mvn: protocol)? We're using
the install feature functionality in our application on a regular basis, so
having this timeout can seriously hinder overall performance.

This was not an issue with the older Karaf 2.2.8.

Thanks for you help!







--
View this message in context: 
http://karaf.922171.n3.nabble.com/30-sec-delay-when-installing-features-using-file-or-http-protocols-tp4031572.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to