Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-931

NormalScopeProxyFactory classloader usage

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.0
    • 1.5.0
    • Core

    Description

      createNormalScopeProxy currently uses the bean class ClassLoader for two purposes:
      1. defining the proxy class
      2. instantiation of the instance provider.

      In our OSGI/WAB environment this usage does not make much sense:
      1. the proxy class should be defined in the classloader which most closely reflects the CDI context lifecycle, which is the web context TCCL.
      2. causes trouble with scope providers (e.g OWB's own RequestScopedBeanInterceptorHandler) when they are defined in another bundle. I don't think there is a proper compatible solution to this (except maybe making extensions fragments) but also trying the TCCL makes this much more painless to use.

      Is there any explanation for this particular choice of classloaders? Are there any reasons not to try TCCL first?

      Attachments

        1. OWB-931-v2-trunk.patch
          11 kB
          Moritz Bechler
        2. OWB-931-v2.patch
          11 kB
          Moritz Bechler
        3. OWB-931-v1.patch
          6 kB
          Moritz Bechler

        Issue Links

          Activity

            People

              struberg Mark Struberg
              mbechler Moritz Bechler
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: