Package org.glassfish.weld.services
Class ProxyServicesImpl
- java.lang.Object
-
- org.glassfish.weld.services.ProxyServicesImpl
-
- All Implemented Interfaces:
org.jboss.weld.bootstrap.api.Service
,org.jboss.weld.serialization.spi.ProxyServices
public class ProxyServicesImpl extends Object implements org.jboss.weld.serialization.spi.ProxyServices
An implementation of theProxyServices
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
Constructors Constructor Description ProxyServicesImpl(org.glassfish.hk2.api.ServiceLocator services)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanup()
ClassLoader
getClassLoader(Class<?> proxiedBeanType)
Class<?>
loadBeanClass(String className)
Class<?>
loadClass(Class<?> originalClass, String classBinaryName)
-
-
-
Method Detail
-
getClassLoader
public ClassLoader getClassLoader(Class<?> proxiedBeanType)
- Specified by:
getClassLoader
in interfaceorg.jboss.weld.serialization.spi.ProxyServices
-
loadBeanClass
public Class<?> loadBeanClass(String className)
- Specified by:
loadBeanClass
in interfaceorg.jboss.weld.serialization.spi.ProxyServices
-
loadClass
public Class<?> loadClass(Class<?> originalClass, String classBinaryName) throws ClassNotFoundException
- Specified by:
loadClass
in interfaceorg.jboss.weld.serialization.spi.ProxyServices
- Throws:
ClassNotFoundException
-
cleanup
public void cleanup()
- Specified by:
cleanup
in interfaceorg.jboss.weld.bootstrap.api.Service
-
-