
|
If you were logged in you would be able to see more operations.
|
|
|
|
Issue Links:
|
Related
|
|
|
|
This issue is related to:
|
|
OSGI-657
OsgiBundleResourcePatternResolver should return ContextResources instead of UrlResources for calls to getResources() whenever feasible
|
|
|
|
|
|
|
|
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
|
|
Description
|
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 |
Show » |
| There are no comments yet on this issue.
|
|