-
Notifications
You must be signed in to change notification settings - Fork 306
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
FISH-790 Refactor, fix bugs in JavaEE Context Utility #5010
Conversation
jenkins test |
1 similar comment
jenkins test |
65dc1ab
to
333d8cc
Compare
…a API for EE context
333d8cc
to
460aa7c
Compare
jenkins test |
jenkins test |
Fixes #5000 |
api/payara-api/src/main/java/fish/payara/context/ContextProducer.java
Outdated
Show resolved
Hide resolved
appserver/web/gf-web-connector/src/main/java/fish/payara/appserver/context/CDIExtension.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a first rough review. I feel I would want way more description of what this PR tries to do, what problems are behind it. As far as I could see this mostly adds a new API and its implementation but isn't used in so many places. Where it is used the main change appears to be to use an instance (something got bound I guess) instead of what corresponds to a generic context. Before I look closer I really would like to get better understanding so please add some paragraphs to the description of the PR that help with that. Thanks.
api/payara-api/src/main/java/fish/payara/context/ContextProducer.java
Outdated
Show resolved
Hide resolved
...ver/web/gf-web-connector/src/main/java/fish/payara/appserver/context/ContextualizerImpl.java
Show resolved
Hide resolved
@@ -219,7 +219,7 @@ public BeanWrapper(Class<?> beanClass) { | |||
catch(MultiException e) { | |||
log(e.getMessage()); | |||
} | |||
this.ctxUtil = ctxUtil; | |||
this.ctxUtil = ctxUtil.map(JavaEEContextUtil::currentInvocation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this deserves a explaining comment as it looks to me you try to address an issue here - was there one? which?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context Util API changed, this line just tracks that change, it would be a compile error otherwise.
It's self-explanatory for me here and shouldn't require a comment, as it would be like
"tracking API changes"
nucleus/common/internal-api/src/main/java/org/glassfish/internal/api/JavaEEContextUtil.java
Show resolved
Hide resolved
...zelcast-bootstrap/src/main/java/fish/payara/nucleus/hazelcast/PayaraHazelcastSerializer.java
Outdated
Show resolved
Hide resolved
@jbee Please read the Javadoc in the new public API. This should explain most, if not all of your questinos |
jenkins test |
jenkins test |
Code tells me what is going on not why. I'd like to know you motivations both towards the problem and the chosen solution so I can understand this change in context. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont't see any obvious issues with the PR but likewise it is hard to tell how or where it would introduce new issues. This is just an area that is hard to verify other than understanding the consequences of the change and its impact which is a hard nut to crack for this one. I'm quite convinced this is an improvement over the old code but ultimately I feel this is your call @MattGill98 being responsible for community.
FISH-790 Refactor, fix bugs in JavaEE Context Utility
Description
Refactored Context utilities into immutable, serializable class.
Fixed many bugs along the way.
Important Info
Blockers
This PR is a blocker for Hazelcast 4 integration.
Testing
New tests
Added a unit test
Testing Performed
All test suites pass, tested with Hazelcast 4 branch
Testing Environment
Java 8, Mac
Documentation
Documentation added via Internal API javadoc for new EE context API
Notes for Reviewers
This issue includes APIs necessary for Hazelcast 4 to be much more tightly integrated with Jakarta EE and Payara
when you think
invocation.preInvoke()
this is easy-to-use replacement and so much more!This refactoring has been in the works for 6+ months, so it's not "new" in any sense of the word