Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » How to set the maximum threads of a SimpleArtifactRepository
How to set the maximum threads of a SimpleArtifactRepository [message #1085119] Mon, 12 August 2013 13:29 Go to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Hello

I am working on a tool to perform a p2 installation similar to the DirectorApplication. I am having problems, when the URI of the artifact repository points to a site location using the http protocol. The download of the artifacts stops running at some point and the operation status is set to the severity IStatus.CANCEL. (Using the file protocol this error does not occur.)

I can not verify this with debugging because the "abort" does not happen in this mode. I found a piece of code in the SimpleArtifactRepository.getArtifacts where multiple Jobs are started to download the requested artifacts. If I manualy set the numberOfJobs to 1 the "abort" also doesn't happen.

I am not sure what the reason for this could be. I would be satisfied with a possibility to set the maximum number of threads to 1. There is a property, that is evaluated by SimpleArtifactRepository.getMaximumThreads for this use cased: PROP_MAX_THREADS (eclipse.p2.max.threads).

I can't locate the correct place to set this property though. Any hints are very welcome!

Thanks
Christoph
Re: How to set the maximum threads of a SimpleArtifactRepository [message #1103050 is a reply to message #1085119] Fri, 06 September 2013 10:28 Go to previous message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
I am one step further in this, as I found out that I can set this property in the repository itself, which is ok for us, since we own the repository. I can achieve the result by changing the artifact.xml after its creation.

<repository name='GO§A Update Site - Artifact Repository' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'>
  <properties size='4'>
    <property name='eclipse.p2.max.threads' value='1'/>
    ... 
  </properties>
  ...
</repository>

I would like to be able to configure our build, so that this is done automatically, when the site is created. Since we are using buckminster, I asked about this directly in the buckminster forum:
http://www.eclipse.org/forums/index.php/m/1099943/#msg_1099943

Another possibility would be to add ant call to the build process. I have been looking at the director and also at the mirrorApplication but i couldn't find an argument to set the repository properties.

Did I miss something?

Thanks for any hints!
Previous Topic:Change service implementation at runtime
Next Topic:getBundleContext() isn't returning Bundle's context classloader
Goto Forum:
  


Current Time: Tue Mar 19 09:20:34 GMT 2024

Powered by FUDForum. Page generated in 0.02008 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top