felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: split package problem
Date Thu, 05 Jan 2012 18:18:44 GMT
On 1/5/12 13:07 , Lance Frohman wrote:
> Thanks

Does this mean you figured out what the system bundle is?

> "Modify the system bundle export of org.w3c.dom to some
> arcane mandatory attribute ..."
> How do you do that? In the config file?

Yeah, you have to do that in the configuration file. This is sort of a 
pain since the default value is baked into the felix.jar file in 
default.properties. Essentially, you set the 
org.osgi.framework.system.packages property in conf/config.properties. 
Normally, it is not set here and simply it defaults to the value in 
felix.jar/default.properties file.

So, what you'd need to do is copy out the default value in 
default.properties and copy it into conf/config.properties. This is only 
tricky because 1) there is some variable substitution going on in 
default.properties (so you'll need to manually do that substitution) and 
2) because the value is long, but otherwise it is just a simply setting 
the property value.

-> richard

>
> On Thu, Jan 5, 2012 at 9:07 AM, Richard S. Hall<heavy@ungoverned.org>wrote:
>
>>
>> On 1/5/12 11:16 , Lance Frohman wrote:
>>
>>> My project is using Apache Felix, and we are having a problem
>>> with a split package. We are using xml with the regular java classes
>>> (jre),
>>> so we need to add org.w3c.dom to the Import-Package. We added some
>>> functionality that uses Apache Batik, but the batik-ext.jar has some
>>> classes in org.w3c.dom also. We tried both making batik into bundles using
>>> the bnd tool on the jar files, and just including the batik .jar files in
>>> the
>>> classpath, but neither method works. I have the OSGi in action book,
>>> but it does not mention this situation, just split packages between two
>>> bundles. What is the best way to resolve this problem?
>>>
>> Like described in section 5.3, you could use Require-Bundle to aggregate
>> the split package. It is sort of ugly, since you'd have to Require-Bundle
>> the system bundle, but it would work. You can try to structure it nicely so
>> you have one bundle that requires the system bundle and includes the
>> additional org.w3c.dom classes and then exports the org.w3c.dom. Modify the
>> system bundle export of org.w3c.dom to some arcane mandatory attribute so
>> no one will use that one, then every import for org.w3c.dom should go to
>> the bundle you create, which delegates to the system bundle for most of the
>> classes and to itself for the remaining classes in org.w3c.dom.
>>
>> ->  richard
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<users-unsubscribe@felix.apache.org>
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message