Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3527

LRA CDI indexer does not consider jboss modules loaded by context class loader

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 5.12.1.Final
    • 5.12.0.Final
    • LRA
    • None

    Description

      On deployment of the LRA application the verification of the LRA compatibility deployment is done within the LRA extension io.narayana.lra.client.internal.proxy.nonjaxrs.LRACDIExtension (https://github.com/jbosstm/narayana/blob/5.12.0.Final/rts/lra/proxy/api/src/main/java/io/narayana/lra/client/internal/proxy/nonjaxrs/LRACDIExtension.java).

      That checks if the deployment follows the LRA spec rules (e.g. any @LRA annotated class requires one or both @AfterLRA and @Compensate annotations). When such rule is broken then deployment exception is thrown.

      The extension looks for classes with context class loader in indexer (Thread.currentThread().getContextClassLoader()(https://github.com/jbosstm/narayana/blob/5.12.0.Final/rts/lra/proxy/api/src/main/java/io/narayana/lra/client/internal/proxy/nonjaxrs/ClassPathIndexer.java#L92) but later the class definition is not loaded with the context class loader but just by the class classloader (https://github.com/jbosstm/narayana/blob/5.12.0.Final/rts/lra/proxy/api/src/main/java/io/narayana/lra/client/internal/proxy/nonjaxrs/ClassPathIndexer.java#L85).

      The context classloader should be considered in the call as well.

      Attachments

        Activity

          People

            ochaloup@redhat.com Ondrej Chaloupka (Inactive)
            ochaloup@redhat.com Ondrej Chaloupka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: