FISH-84 Fix for using EL to configure OpenId in EAR #5212
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes #4469.
Sometimes
CDI.current().getBeanManager()
returns a bean manager for another module in the EAR (in this case for the EJB JAR instead of for the WAR). As suggested in https://lists.jboss.org/pipermail/cdi-dev/2016-April/008185.html, looking up the bean manager using InitialContext returns the correct bean manager for the current module (WAR in this case).Also fixes an issue in Admin Console: https://github.com/sharpedavid/el-bug-example has app to deploy to Payara. Go to admin console and click on the application name. At the bottom of the page there should be a component table with entries.
Important Info
Testing
New tests
Tests in this PR, in tests/payara-samples/samples/openid:
OpenIdELInEarTest
- test for using EL to configure OpenID connector in EAROpenIdELTest
- test for using EL to configure OpenID connector in WAR, just in caseTesting Performed
Manual test of the UI change in Admin Console. Automated tests in payara-samples.
Test suites executed
Testing Environment