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

Session Scoped bean got stucked in CreationalContextImpl.incompleteInstances map

    XMLWordPrintable

Details

    • Hide

      Deploy the attached war into Tomcat6.0.x, start TC, go to the URL: http://localhost:8080/weld-numberguess/home.jsf, try to guess 10 times, in the tomcat console, it should print out "destruct the Game now.", after that do a heap dump, use eclipse MAT to open the dump and search Game, should be able to see the attached screenshot.

      Show
      Deploy the attached war into Tomcat6.0.x, start TC, go to the URL: http://localhost:8080/weld-numberguess/home.jsf , try to guess 10 times, in the tomcat console, it should print out "destruct the Game now.", after that do a heap dump, use eclipse MAT to open the dump and search Game, should be able to see the attached screenshot.
    • Medium

    Description

      I have a session scoped bean annotated with @Named @SessionScoped, and in the bean's method, I called context.getExternalContext().invalidateSession(); to end the conversation and after @PreDestroy called, the bean is still in the memory, it was hard reference from CreationalContextImpl.incompleteInstances map.

      The issue can be reproduced with modified weld-numberguess example (I attached with this ticket)

      Attachments

        1. Game.java
          3 kB
        2. screenshot-1.jpg
          screenshot-1.jpg
          369 kB
        3. weld-numberguess.war
          4.90 MB

        Activity

          People

            marko.luksa@gmail.com Marko Luksa (Inactive)
            wangliyu_jira Wang Liyu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: