BJ is correct. Just to elaborate. The framework enforces an invariant that ensures all bundles installed in the Framework have a unique bundle location string. Regions, hooks, etc. cannot do anything to break this enforced invariant.
If you use the Region.installBundle method it will modify the location
string to ensure it is unique on installation. It does this by appending a
URI fragment to the input location which includes the region name. For
example, the location string file://bundles/mybundle.jar becomes
file://bundles/mybundle.jar#region1 if the region name is region1. You
should do the something similar if you are not going through the Region API
to install the bundles.
Tom
|------------>
| From: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|BJ Hargrave/Austin/IBM@IBMUS
|
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|Equinox development mailing list <[email protected]>,
|
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|09/23/2011 06:18 AM
|
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|Re: [equinox-dev] same bundle in multiple regions
|
>--------------------------------------------------------------------------------------------------------------------------------------------------|
You can install the same bundle (same bits) using different locations
strings. But a location string is a unique identifier for an installed
bundle. Use the 2 argument version of BundleContext.installBundle using
unique location strings to install a bundle from the same URL multiple
times.
--
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
[email protected]
From: Borislav Kapukaranov <[email protected]>
To: [email protected],
Date: 2011/09/23 06:58
Subject: [equinox-dev] same bundle in multiple regions
Sent by: [email protected]
Hey folks,
I have a question on installing a bundle from the same location.
Take the latest Virgo 3.0.x as a good example of more than one region and
connect with telnet to each console.
If you try to install a bundle from the same location in both regions via
each region's console this will fail with something like "Bundle already
installed...".
Is this working as designed? Shouldn't it be possible to install a bundle
from the same location(same string) if it's in different regions - Equinox
may treat it as a different bundle and create it its own data folder, id,
etc?
http://dev.eclipse.org/mhonarc/lists/equinox-dev/msg06875.html suggest that
should be possible, as the first installation won't be visible to the
context of the other region.
Thanks,
Bobby_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev
<<inline: graycol.gif>>
<<inline: ecblank.gif>>
_______________________________________________ equinox-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/equinox-dev
