Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-19904

PreDestroy annotation doesn't work on ConversationScoped bean together with sessionDestroyed on HttpSessionListener

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Blocker
    • None
    • 7.4.0.CD20-CR1
    • CDI / Weld, Undertow
    • None

    Description

      PreDestroy annotation doesn't work on ConversationScoped together with sessionDestroyed on HttpSessionListener

      This issue is a regression against CD19. This could be caused by weld upgrade from 3.1.3 to 3.1.4.

      If servlet uses "@Inject private Conversation conversation;" and bean with @ConversationScoped, then method with @PreDestroy annotation on bean should be called after http timeout (it is in CD19, but is not in CD20 = regression). The same for sessionDestroyed method on HttpSessionListener class.

      Steps to reproduce:

      1. Download sources.zip
      2. Deploy deployment to the server (deploy -f target/custom-application.war)
      3. Start client
        1. mvn clean package
        2. java -jar target/custom-client.jar
        3. RuntimeException should not be thrown (is not in CD19, but is in CD20)

      This issue is tested in ConversationContextDestroyedOnSessionTimeoutTest in Weld TS. This test pass with CD19 but failed with CD20.

      Attachments

        Issue Links

          Activity

            People

              manovotn Matěj Novotný
              mkopecky@redhat.com Marek Kopecky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: