Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-528

stopContexts() and container shutdown() do not dispose of application scoped beans

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.5
    • 0.6
    • CdiControl
    • None
    • weld se 1.1.16

    Description

      when using the CdiControl module stopContexts() and container shutdown() do not dispose of application scoped beans

      dispose methods are not getting called and same goes for preDestroty

      based on a comment from https://issues.jboss.org/browse/WELD-1072
      I added

      ApplicationContext context = BeanProvider.getContextualReference(ApplicationContext.class);
      context.invalidate();

      and that seems to do the trick

      I am not sure if this is a weld issue or a DS?
      does it only apply to application scope?

      maybe stopContexts() can iterate over all 4 builtin contexts and specifically invalidate each one if its active?

      Attachments

        1. appscope.zip
          7 kB
          Shay matasaro

        Activity

          People

            gpetracek Gerhard Petracek
            shay_matasaro Shay matasaro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: