Hi,
I have been consuming the proxy bundle with the weaving support for a while
now, however it results in weaving classes that will never be proxies ever.
In fact I want to "weave" the classes that live in applications, but not my
runtime. I would like to be able to disable weaving for bundles in my
runtime.
I have prototyped a change locally which involves providing a new service:
package org.apache.aries.proxy.weaving;
import org.osgi.framework.Bundle;
/**
* Services of this interface are used by the ProxyManager's weaving
implementation to
* decide if a specific bundle should be subject to weaving.
*/
public interface ProxyWeavingController
{
/**
* Returns true if the bundle should be subject to proxy weaving. If it
returns
* false then the bundle will not be weaved. The result of this method is
immutable
* for a given bundle. That means repeated calls given the same bundle
MUST
* return the same response.
*
* @param b the bundle that is being weaved
* @return true if it should be woven, false otherwise.
*/
public boolean shouldWeave(Bundle b);
}
I've updated the proxy weaving support to call services and only if they
all agree that the bundle should be woven will it be woven. I'd like to
commit this to the codebase, but I wanted to get peoples thoughts before I
did.
Thanks
Alasdair
--
Alasdair Nottingham
[email protected]