Issue Details (XML | Word | Printable)

Key: OSGI-479
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Costin Leau
Reporter: Sam Brannen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring OSGi

OsgiBundleResourceLoader should be pluggable in AbstractOsgiBundleApplicationContext

Created: 08/May/08 02:58 PM   Updated: 05/Nov/08 01:54 PM
Component/s: CORE
Affects Version/s: 1.1 M2
Fix Version/s: 1.1 RC1

Time Tracking:
Not Specified

Issue Links:
Related
 


 Description  « Hide
I've created an extension to OsgiBundleResource and a corresonding extension to OsgiBundleResourceLoader which instantiates my custom OsgiBundleResource.

However, in order to register my custom OsgiBundleResourceLoader, I had to:

1) use reflection to set the private 'osgiResourceLoader' field in AbstractOsgiBundleApplicationContext.
2) create a forked copy of OsgiResourceUtils in order to maintain compatible semantics.

Thus, please refactor AbstractOsgiBundleApplicationContext's setBundleContext(BundleContext) method to be a template method, and allow subclasses protected access to the necessary internals. In addition, moving OsgiResourceUtils to a publicly exported package will allow developers to extend OsgiBundleResource.

FYI: The reason I created these custom extensions was to override OsgiBundleResource's getFile() method, so that attempts to get a file from a bundle (with a non-prefixed resource path, i.e., local to the bundle) do not automatically throw a FileNotFoundException as is the case when getFile() delegates to AbstractResource's getFile() implementation. To solve this issue, my custom extension attempts to first locate the File resource in the (possibly) exploded bundle. If you would like further details on this use case, please contact me directly for further details.

Thanks,

  Sam

 All   Comments   Work Log   Change History   FishEye   Builds      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.