OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.15k stars 587 forks source link

Investigate LRACDIExtension in narayana and TckParticipantTests failures #13185

Open idlewis opened 4 years ago

idlewis commented 4 years ago

Does the cdi extension need to be registered as a cdi extension in mpLRA-1.0 feature

It turns out this is necessary to support LRA resources where complete or compensate are not JAX-RS methods.

This is required to pass the TCK, specifically the tests in TckParticipantTests.java mostly fail without this.

The extension is currently not getting registered in the participant feature, so this issue needs to be fixed

idlewis commented 4 years ago

After writing some code to get the extension registered and the bean injected correctly, the tck tests are still failing. This is because:

To fix this, need to work out how to get the list of application classes in Open Liberty, and then how to supply that list to narayana. The second part of that will probably require a change in Narayana

It will also require #14816 to get these test to work, as the proxy resources are how the narayana implementation recieves calls from the coordinator that are aimed at non-jaxrs methods

idlewis commented 3 years ago

The change to register the CDI extension was merged in #14820 . However, the change to get the extension to properly scan the application for non-jaxrs methods is not yet done

idlewis commented 3 years ago

This branch of the narayana code (lgpl) contains a proposed change to put the class discovery code behind an interface https://github.com/idlewis/narayana/tree/5106.interface This branch of liberty https://github.com/idlewis/open-liberty/tree/lra-cdi-finder contains proof of concept code to implement the interface. Much further tidying required though