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

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 2.3.2.Final
    • Fix Version/s: 3.0.0.Beta1
    • Component/s: None
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mkouba Martin Kouba
                Reporter:
                meetoblivion John Ament
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: