Hi all,
I've specified Spring-Context header in a fragments's Manifest file, but the fragment's host is not Spring-powered, but it seems the fragment's context is not created at runtime. Is it possible at all with this scenario ?
Regards,
Setya
Hi all,
I've specified Spring-Context header in a fragments's Manifest file, but the fragment's host is not Spring-powered, but it seems the fragment's context is not created at runtime. Is it possible at all with this scenario ?
Regards,
Setya
What OSGi framework are you using? The header is not required if the fragment uses the standard Spring DM location. However, if it does specify it, then as long as the framework merges the manifest headers, the bundle should be picked up.
Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
Please use [ c o d e ] [ / c o d e ] tags
Hi,
I'm using Equinox OSGI framework.
Here's the various scenario :
1. Spring context file and the manifest header are in the fragment bundle, Spring is unable to find it.
2. The manifest header in the host bundle and the Spring context file in fragment, Spring is able to find it.
For above scenario, the context file 'ui-test-context.xml' resides in 'config' folder outside of META-INF so I specify header as 'Spring-Context: config/ui-test-context.xml'.
3. Spring context file is in standard SpringDM location in the fragment bundle, Spring is able to find it.
Regards,
Setya
Last edited by Setya; Nov 21st, 2009 at 11:21 AM. Reason: Adding more information
Setya, could you please raise an issue on jira and submit a test fragment as well as information on the exact OSGi framework used.
Spring DM uses the OSGi APIs so if the manifest merging occurs incorrectly, the configs will not be picked up since the framework simply cannot see them.
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
Please use [ c o d e ] [ / c o d e ] tags
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
Please use [ c o d e ] [ / c o d e ] tags
Setya, after adding some integration tests and checking the OSGi spec (section 3.13), it seems that only some fragment headers are merged with the host. Specifically only Import-Package, Export-Package and Require-Bundle headers are merged, the rest are simply ignored. Thus any Spring header defined in the fragment will not be seen by Spring DM because the OSGi API does no provide access to it.
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
Please use [ c o d e ] [ / c o d e ] tags