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

[GSS](7.3.z) WFLY-14546 - NameNotFoundException: java:comp/TransactionSynchronizationRegistry when firing and observing CDI events asynchronously

    XMLWordPrintable

Details

    • +
    • Workaround Exists
    • Hide

      When using a custom Executor as Notification options the problem is not reported:

      bookingEvent.fireAsync(e, NotificationOptions.ofExecutor(threadPool))

      yet the application enters in an infinite loop of fire-notify events. (I believe it's a different problem)

      Show
      When using a custom Executor as Notification options the problem is not reported: bookingEvent.fireAsync(e, NotificationOptions.ofExecutor(threadPool)) yet the application enters in an infinite loop of fire-notify events. (I believe it's a different problem)
    • Hide

      A jms destination needs to be added from the CLI:

      jms-queue add --queue-address=UCEWL_SANCTION_REPLY --entries=java:/jms/queue/UCEWL_SANCTION_REPLY

      Build and deploy the attached project:

      $ mvn clean install wildfly:deploy

      Then, it can be tested using the Servlet in it (http://localhost:8080/test)

      Show
      A jms destination needs to be added from the CLI: jms-queue add --queue-address=UCEWL_SANCTION_REPLY --entries=java:/jms/queue/UCEWL_SANCTION_REPLY Build and deploy the attached project: $ mvn clean install wildfly:deploy Then, it can be tested using the Servlet in it ( http://localhost:8080/test )

    Description

      When firing an event asynchronously from an MDB and then using the pattern @ObservesAsync in a CDI bean to consume the event this results in:

      Caused by: javax.naming.NameNotFoundException: java:comp/TransactionSynchronizationRegistry
       at org.jboss.as.naming@7.3.0.GA-redhat-00004//org.jboss.as.naming.InitialContext$DefaultInitialContext.findContext(InitialContext.java:191)
       at org.jboss.as.naming@7.3.0.GA-redhat-00004//org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:235)
       at org.jboss.as.naming@7.3.0.GA-redhat-00004//org.jboss.as.naming.NamingContext.lookup(NamingContext.java:193)
       at org.jboss.as.naming@7.3.0.GA-redhat-00004//org.jboss.as.naming.NamingContext.lookup(NamingContext.java:189)
       at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409)
       at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409)
       at org.wildfly.extension.messaging-activemq//org.wildfly.extension.messaging.activemq.deployment.injection.InjectedJMSContext.lookup(InjectedJMSContext.java:143)
       ... 51 more
       [CIRCULAR REFERENCE:java.lang.RuntimeException: javax.naming.NameNotFoundException: java:comp/TransactionSynchronizationRegistry] 

      Attachments

        Issue Links

          Activity

            People

              spyrkob Bartosz Spyrko-Smietanko
              fmarchio@redhat.com Francesco Marchioni (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: