-
Bug
-
Resolution: Done
-
Major
-
5.12.0.Final
-
None
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.