Felix Meschberger wrote:
On 6/20/06, Richard S. Hall <[EMAIL PROTECTED]> wrote:
I cannot say that I totally understand your solution.
Maybe I just too many words again :-)
* The Felix class has an instance field m_resourceFactory of type
OSGiResourceFactory which is assigned in the Felix.start() method.
* All resource accesses go through instance method
OSGiResourceFactory.createResource(String)
* A resource can also be acquired through OSGiResource.getChild(String
relPath)
This solution has no static global - except the somewhat static global
in the property resolver.
Ok, that is good.
This sounds promising and also allows me to solve yet another issue:
In my approach the storage has to be present outside the framework. If
I would be able to plugin into the creation of the BundleRevision
instance, this would be great as I could create a bundle which just
acquires the storage and provides functionality to access bundles in
that storage
I do not think hooking into the creation of the IContent instances is
a top priority, as those are created inside the BundleRevisions, right
?
That is correct.
But going that way, would probably also require touching the
BundleCache and BundleArchive classes, as they currenty are File
based.
Yes, that is correct.
In fact the Felix.start method is documented to support a
felix.cache.class property which names the BundleCache class to use -
yet it seems to not be implemented like this.
This area was refactored at the beginning of this year, during which
time the capability to provide a new cache implementation was removed,
since most of the reasons for doing so could be emulated with creating
new revision or content implementations.
However, this area is not completely baked, so we are open to improving it.
In general, any solution for doing stuff like you have suggested, I
would hope, should concentrate on using/improving these existing
mechanisms rather than creating new ones.
Maybe to illustrate my solution, I will just provide the patch to the
mailing list in minute.
Ok.
-> richard