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

Refactoring around WebBundleDescriptor and EjbBundleDescriptor #24337

Merged
merged 22 commits into from
Mar 23, 2023

Commits on Mar 19, 2023

  1. Refactored WebBundleDescriptors

    - Target: make unit tests possible
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    aa2137e View commit details
    Browse the repository at this point in the history
  2. Further refactoring - replacing unused/obsoleted methods, added javadocs

    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    466b608 View commit details
    Browse the repository at this point in the history
  3. DeploymentDescriptorNode now supports compatible parameters

    - originally it required an exact match of the parameter's type
    - now it first tries the exact match, when no such method exists it tries to
      find any compatible method of the same name.
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    04ed447 View commit details
    Browse the repository at this point in the history
  4. EjbBundleRefactoring - first step

    - instead of abstract methods moving their implementation as a default impl
    - It is quite complicated work affecting many places, so I will do rather
      smaller steps.
    - about generics - the coverage is not perfect because of cyclic dependencies
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    c1bdc9c View commit details
    Browse the repository at this point in the history
  5. ResourceAnnotationControl - moved copy pasted code

    - all classes used the same method.
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    e6bef17 View commit details
    Browse the repository at this point in the history
  6. Partially reverted incompatible changes in EJB descriptors

    - broke connectors in tests; maybe it wouldn't be an issue for user, but I am
      not sure with that. I will find safer path.
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    c9343b0 View commit details
    Browse the repository at this point in the history
  7. Moving another methods to EjbBundleDescriptor + javadoc

    - default implementations
    - EjbApplicationExceptionInfo
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    fb89c21 View commit details
    Browse the repository at this point in the history
  8. Tracking evolution of the ApplicationValidatorTest with the refactoring

    - Issue: I tried to use mocking, but I have found that it doesn't work well and
      even if, it would not cover too much of the implementation.
    - dol and ejb-container have too many relations, in fact the abstraction was
      unusable and worthless (and even undocumented).
      - I can create mocks for interfaces but I can't use them for validator.
      - I can create half-initialized mock of the abstract class, but it throws
        exceptions which take too much time to investigate and finally I find
        that the issue is the mock, not the code I wanted to test.
      - Same would apply for custom implementations (like is the only one,
        ejb-container) - too much details matter.
    - In practice: dol should have much better API, OR all descriptors and nodes
      whould move to DOL. They can be extended and used in ejb-container, but must
      have some basic consistent meaningful implementation.
    - So I do some basic steps forward now.
    - Final result: test covering bug we have noticed in logs + the fix
      not breaking anything else. Side effect result: easier future changes.
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    9bb9ebd View commit details
    Browse the repository at this point in the history
  9. Fixed HK2 dependency - securityRoleMapperFactoryis optional

    - it was already checked for null
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    1f5ba67 View commit details
    Browse the repository at this point in the history
  10. EjbBundleDescriptor - moving more fields to the parent

    - This is safe as there is only one child of this abstract class
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    e36eec8 View commit details
    Browse the repository at this point in the history
  11. EjbBundleDescriptorImpl cleanup - old deprecations, javadoc

    - Unused methods removed
    - Used methods documented (at least minimal notes)
    - Deprecated XML nodes from GF 3.1 marked as deprecated and removed code
      which used them but was worthless. Now they should be just tolerated.
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    2851a9d View commit details
    Browse the repository at this point in the history
  12. ComponentValidator formatting + fixed possible NPE

    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    bb5199f View commit details
    Browse the repository at this point in the history
  13. Long process of resolving DOL cyclic dependencies resolved via reflec…

    …tion
    
    - one of intermediate steps - moving methods
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    f7a9771 View commit details
    Browse the repository at this point in the history
  14. More strict DeploymentDescriptorNode - throwing exceptions

    - validators cover possible issues just partially
    - better break deploy asap with more helpful info, especially when it is about
      glassfish issues.
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    5ab479d View commit details
    Browse the repository at this point in the history
  15. Fixed comparison (carType() can return null!)

    - broken in recent commit of the same PR
    - also fixed some logs and formatting
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    11bff77 View commit details
    Browse the repository at this point in the history
  16. Moving classes and methods, javadocs, fixed logging nullpointers

    - most of issues were more visible when I caused some inconsistency
    - the commit is unfortunately huge, but necessary
    - the architecture of the DOL is broken, always was - depends on reflection
      across modules and packages
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    0deee93 View commit details
    Browse the repository at this point in the history
  17. Archive types moved to DOL

    - Fixes the issue when DOL used nulls because singletons weren't found in HK2
    - Affected appclient, tests, validations, processing descriptors, etc.
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    96e9429 View commit details
    Browse the repository at this point in the history
  18. Fixed resource validation + partial test coverage

    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    56a6b13 View commit details
    Browse the repository at this point in the history
  19. Imports in Globals

    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    a5e7374 View commit details
    Browse the repository at this point in the history
  20. Fixed nullpointers in connectors-runtime

    - seen when deploying broken CargoTracker
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    ea3d9f1 View commit details
    Browse the repository at this point in the history
  21. Removed unused import (Disabled) from test

    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    224fb08 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. Removed unused methods and dead ends, smaller optimizations

    - foreach, avoiding for-keys-find-value, Vector replaced by ArrayList
    - formatting, generics, javadocs
    
    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
    dmatej committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    14602ed View commit details
    Browse the repository at this point in the history