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

ContextNotActive thrown when a static instance holds a reference to a bean and container restarts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 3.0.0.Beta1
    • 2.3.2.Final
    • None
    • None

    Description

      I suspect that this affects the entire 2.3 line. You can run the Weld2 profile in DeltaSpike prior to my last 2 commits to reproduce the issue, specifically in the proxy module.

      Basically, if you have a static reference that holds a reference to an app scoped bean, and an SE container stops and starts again, any contextual references that may be held in that static instance go away. However, a ContextNotActive exception is thrown. It was unclear why Weld was stating that the App Scope context was not active.

      ContextNotActive isn't really appropriate here. It should be some other exception.

      We ultimately fixed by removing the static reference.

      Attachments

        Activity

          People

            mkouba@redhat.com Martin Kouba
            meetoblivion_jira John Ament (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: