Class 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 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 Detail

      • ProxyServicesImpl

        public ProxyServicesImpl​(org.glassfish.hk2.api.ServiceLocator services)
    • Method Detail

      • cleanup

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

        public Class<?> defineClass​(Class<?> originalClass,
                                    String className,
                                    byte[] classBytes,
                                    int off,
                                    int len)
                             throws ClassFormatError
        Specified by:
        defineClass in interface org.jboss.weld.serialization.spi.ProxyServices
        Throws:
        ClassFormatError