Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed ejb tests + Fixed generating EJB classes #23770

Merged
merged 14 commits into from
Jan 27, 2022

Conversation

dmatej
Copy link
Contributor

@dmatej dmatej commented Jan 23, 2022

This PR is a bit nonstandard, because it fixes several broken things which fixed work together. The process was long and iterative as I learned to understand the causes.

  1. Fixed Glassfish's EJB tests (ejb_all, ejb_group_1, ejb_group_2, ejb_group_3 + new ejb_group_embedded)
  • tested with JDK11 and JDK17 locally

image

  1. Fixed generating classes and proxies for EJB (PFL is broken) in JDK17
  2. Replaced most of deprecated calls to ClassLoader.defineClass - left just where there is no other way
  3. Some issues were resolved by refactoring
  4. Removed j2ee management-api (already unused)
  5. Optimized Jenkinsfile and related files to get what we can from the build server, however there is still work to do.

TCK test result:
image

…rta.management.j2ee-api removal

- reverted some changes from the previous commit
- removed tests depending on the j2ee-api jar
…d deprecated Proxy.getProxyClass

- EJB tests failed on JDK17 because of this
- also more consistent generateAndLoad (to be finished in next commits)
- ejb_all/ejb_group_1/ejb_group_2/ejb_group_3/ejb_group_embedded
- added add-opens where required
- new group for embedded as it is significantly different than others
  and I often required to execute it separatedly
- added -Dorg.glassfish.gmbal.no.multipleUpperBoundsException=true for the
  standaloneclient test stub
- tests will fail, but with this commit it means that they do work!!!
- not completely as under some circumstances we cannot live without them
- but we can decide when
- if the class was generated in the same package, the usage and the classloader
  are suitable, we can use MethodHandles. Otherwise we have to use the
  ClassLoader.defineClass method (accessed by reflection)
- we had to avoid using Base class from PFL, because it uses just MethodHandles
  XOR ClassLoader XOR Unsafe depending on the JDK.
- this solution was tested by
  - glassfish's ejb_all tests with JDK11 and JDK17
  - TCK/ejb with JDK11
…ot in the same package

- that means that we cannot use the MethodHandles.Looku.defineClass impl
@dmatej dmatej force-pushed the fix-ejb-tests branch 19 times, most recently from 0485abb to 1ffb6cc Compare January 25, 2022 10:29
@dmatej dmatej force-pushed the fix-ejb-tests branch 15 times, most recently from e0f6237 to 7344cb1 Compare January 27, 2022 06:27
- formatting of the code to make it easier to read
- fixed several log messages (wrong formatting)
- ContainerInfo used to reduce duplications
- replaced several deprecated method calls with simple straight replacements
- deleted 20 years old TODOs
- memory and cpu settings tested for current hardware usually used on jenkins,
  respecting limits
- compilation without test with parallelized maven execution
- upgraded jnlp
- separate settings for maven and ant tests
- bundles content with fast compression, excluded what we don't need
@dmatej dmatej marked this pull request as ready for review January 27, 2022 19:08
@dmatej dmatej self-assigned this Jan 27, 2022
@dmatej dmatej added the bug Something isn't working label Jan 27, 2022
@dmatej dmatej added this to the 6.2.5 milestone Jan 27, 2022
Copy link
Contributor

@arjantijms arjantijms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, amazing!

@arjantijms arjantijms merged commit 0664fae into eclipse-ee4j:6.x Jan 27, 2022
@dmatej dmatej deleted the fix-ejb-tests branch January 28, 2022 14:06
@pzygielo pzygielo mentioned this pull request Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working techdebt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Classes generated by PFL's Wrapper are sometimes incompatible with JDK17
2 participants