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
[WFLY-14546] Restore naming context #14101
Conversation
|
||
@Override | ||
public void execute(Runnable command) { | ||
WeldTaskWrapper task = new WeldTaskWrapper(command, NamespaceContextSelector.getCurrentSelector()); |
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.
Avoid wrapping if Weld isn't yet started, org.jboss.weld.Container#instance()
can be used to check state.
You can see how we do similar check here - https://github.com/wildfly/wildfly/blob/master/weld/subsystem/src/main/java/org/jboss/as/weld/WeldProvider.java#L69-L70
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.
Thanks @manovotn, I added the check
@manovotn can you re-review this please? Should I ask anybody else for the review as well? |
I am fine with this. It shouldn't affect bootstrap at least. The only other person you can try to get review from is @mkouba ;-) |
} | ||
} | ||
|
||
class WeldTaskWrapper implements Runnable { |
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.
This class and WeldExecutor
do not seem to need to access the enclosing class (WeldExecutorServices
) so it might make sense to make it static
.
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.
@spyrkob Can you make this change? Thanks.
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.
Sorry, I missed that. It's updated now.
Looks good. But I would be interested in the numbers as well ;-). |
/retest |
Issue: https://issues.redhat.com/browse/WFLY-14546