Package org.apache.aries.util

Examples of org.apache.aries.util.BundleToClassLoaderAdapter


    InvocationHandler ih = new JNDIServiceDamper(ctx, interface1, filter, pair, dynamicRebind);
   
    // The ClassLoader needs to be able to load the service interface classes so it needs to be
    // wrapping the service provider bundle. The class is actually defined on this adapter.
   
    result = Proxy.newProxyInstance(new BundleToClassLoaderAdapter(serviceProviderBundle), clazz.toArray(new Class<?>[clazz.size()]), ih);
    return result;
  }
View Full Code Here


public class JdkProxyFactory implements ProxyFactory {

    public Object createProxy(final Bundle bundle,
                              final Class[] classes,
                              final Callable<Object> dispatcher) {
        return Proxy.newProxyInstance(new BundleToClassLoaderAdapter(bundle), classes,
                new InvocationHandler() {
                    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                        try {
                            return method.invoke(dispatcher.call(), args);
                        } catch (InvocationTargetException ite) {
View Full Code Here

   
    if (cl == null) {
      // ok so we haven't found a class loader yet, so we need to create a wapper class loader
      cl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
        public ClassLoader run() {
          return new BundleToClassLoaderAdapter(b);
        }
      });
    }
   
    if (cl != null) {
View Full Code Here

TOP

Related Classes of org.apache.aries.util.BundleToClassLoaderAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.