Another potential limitation you will run into is the maximum number of
file handles the OS you are running on will allow a single process to open
concurrently.  Each bundle is contained in a separate jar file which needs
to be opened by the framework to load content from the bundle.  If your
framework implementation keeps the jar files open while the bundle is
installed in the framework then you will eventually run out of file handles
to use.  This is an implementation detail of the framework, but I know
Equinox has ways of dealing with this issue when you have 1000s of bundles
installed.

Tom




|------------>
| From:      |
|------------>
  
>-----------------------------------------------------------------------------------------------------------------------------------------------|
  |Marcel Offermans <marcel.offerm...@luminis.nl>                               
                                                                  |
  
>-----------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  
>-----------------------------------------------------------------------------------------------------------------------------------------------|
  |OSGi Developer Mail List <osgi-dev@mail.osgi.org>                            
                                                                  |
  
>-----------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  
>-----------------------------------------------------------------------------------------------------------------------------------------------|
  |12/06/2010 01:04 AM                                                          
                                                                  |
  
>-----------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  
>-----------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: [osgi-dev] Maximum number of bundles and services in one OSGi    
framework                                                              |
  
>-----------------------------------------------------------------------------------------------------------------------------------------------|





Also, in a dynamic environment, every new service or bundle gets a higher
ID, so it's not just a matter of running out of IDs because you have so
many bundles and services installed at once, you might theoretically also
run out if you do a lot of updates to the system.

However, once you start doing the math, Long.MAX_VALUE is a very long time.
If you "consume" 1000 IDs per second, your application will run out after
approximately 584 million years. I suggest after that period of time you
simply re-install your bundles on a new computer. ;)

Greetings, Marcel

On 6 Dec 2010, at 4:19 , BJ Hargrave wrote:

      Bundle id is a long, Service id is a long. So maximum is
      Long.MAX_VALUE. I am guessing you will run out of memory long before
      you reach the id limit. Each bundle has a class loader. If the JVM
      has some limit on number of ClassLoaders, then that will be a factor
      also.
      --



 BJ Hargrave
 Senior Technical Staff      office: +1 386 848
 Member, IBM                               1781
 OSGi Fellow and CTO of the  mobile: +1 386 848
 OSGi Alliance                             3788
 hargr...@us.ibm.com









      From:        Martin Petzold <mpetz...@gmx.net>
      To:        osgi-dev@mail.osgi.org
      Date:        2010/12/05 17:29
      Subject:        [osgi-dev] Maximum number of bundles and services in
      one OSGi        framework
      Sent by:        osgi-dev-boun...@mail.osgi.org





      Hi folks,

      what is the maximum number of bundles and services I can
      install/register in one OSGi framework? What is the maximum amount of

      remote services in a service environment, probably = max. of in one
      OSGi
      framework? Is the limitation on some type of identifier or is it the
      number of threads the JVM can provide or something different? Of
      course
      memory in the end...

      How many bundles and services have you already had running in one
      OSGi
      framework?

      Thanks,

      Martin
      _______________________________________________
      OSGi Developer Mail List
      osgi-dev@mail.osgi.org
      https://mail.osgi.org/mailman/listinfo/osgi-dev

      _______________________________________________
      OSGi Developer Mail List
      osgi-dev@mail.osgi.org
      https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to