org.glassfish.weld.services
Class ProxyServicesImpl

java.lang.Object
  extended by org.glassfish.weld.services.ProxyServicesImpl
All Implemented Interfaces:
org.jboss.weld.bootstrap.api.Service, org.jboss.weld.serialization.spi.ProxyServices

public class ProxyServicesImpl
extends java.lang.Object
implements org.jboss.weld.serialization.spi.ProxyServices

An implementation of the ProxyServices Service. This implementation uses the thread context classloader (the application classloader) as the classloader for loading the bean proxies. The classloader that loaded the Bean must be used to load and define the bean proxy to handle Beans with package-private constructor as discussed in WELD-737. Weld proxies today have references to some internal weld implementation classes such as javassist and org.jboss.weld.proxy.* packages. These classes are temporarily re-exported through the weld-integration-fragment bundle so that when the bean proxies when loaded using the application classloader will have visibility to these internal implementation classes. As a fix for WELD-737, Weld may use the Bean's classloader rather than asking the ProxyServices service implementation. Weld also plans to remove the dependencies of the bean proxy on internal implementation classes. When that happens we can remove the weld-integration-fragment workaround and the ProxyServices implementation

Author:
Sivakumar Thyagarajan

Constructor Summary
ProxyServicesImpl(org.jvnet.hk2.component.Habitat habitat)
           
 
Method Summary
 void cleanup()
           
 java.lang.ClassLoader getClassLoader(java.lang.Class<?> proxiedBeanType)
           
 java.lang.Class<?> loadBeanClass(java.lang.String className)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyServicesImpl

public ProxyServicesImpl(org.jvnet.hk2.component.Habitat habitat)
Method Detail

getClassLoader

public java.lang.ClassLoader getClassLoader(java.lang.Class<?> proxiedBeanType)
Specified by:
getClassLoader in interface org.jboss.weld.serialization.spi.ProxyServices

loadBeanClass

public java.lang.Class<?> loadBeanClass(java.lang.String className)
Specified by:
loadBeanClass in interface org.jboss.weld.serialization.spi.ProxyServices

cleanup

public void cleanup()
Specified by:
cleanup in interface org.jboss.weld.bootstrap.api.Service


Copyright © 2012 GlassFish Community. All Rights Reserved.