May 20th, 2010, 02:16 PM
Why are bundles containing resources unpacked when deployed? Can I keep them packed?
The dm server unpacks bundles that contain resources ( i.e. other jars ) when it deploys them to the work/osgi directory and leaves bundles without internal resources in the packed jar/zip format.
This is causing problems for us because we bundled a large 3rd party package and it uses
URL source = BootStrap.class.getProtectionDomain().getCodeSourc e().getLocation();
to get it's location. Usually this returns a fully qualified path on the server to the containing packed bundle. But on the dm server since the bundle is unpacked it returns fully qualified path ending with the folder of the unpacked bundle.
The bootstrap class then fails when it tries to read what it expects is a jar but is actually a folder with:
My two options are to
1. figure out if it is possible to configure the server not to unpack this type of bundle when it is deployed.
2. Check out the 3rd party project, modify the Bootstrap class and recompile the whole thing.
Option 1 sounds better to me if it is possible.