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


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

      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.

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