Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1167

Client proxy serialization broken in non-isolated environment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.8.Final, 2.0.0.Alpha2
    • None
    • None

    Description

      This issue only occurs in deployments where a single classloader is used for loading several subsequent deployments - such as unit tests that use embedded weld container.

      When a client proxy is created for a normal-scoped bean, the beanId (which contains identification information of the defining BDA) is hardcoded in the proxy class.

      https://github.com/weld/core/blob/2.0/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyFactory.java#L114

      If another subsequent microdeployment bundles the same normal-scoped bean, the classloader uses the proxy class from the previous microdeployment. The proxy class instance then fails to deserialize properly since the beanId may no longer be used in the current deployment (the BDA name may be different)

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            rhn-engineering-jharting Jozef Hartinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: