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

[EJBCLIENT-389] DiscoveryEJBClientInterceptor: prefer local node if a… #485

Merged
merged 1 commit into from Nov 25, 2020

Conversation

tadamski
Copy link
Contributor

@chengfang could you please review

location = Affinity.LOCAL.getUri();
} else {
location = uris.get(nodeName);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it work when exclude-local-receiver is true (e.g., the user always want invocations to go over network)?

Copy link
Contributor Author

@tadamski tadamski Nov 19, 2020

Choose a reason for hiding this comment

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

no, it won't respect this setting - I'm working on alternative solution

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chengfang I have created an alternative solution which prioritize local URIs; this solution would respect exclude-local-receiver settings (when it is set LocalEJBReceiver is not registered and only remote URI would be added)

// we want to prioritize using local invocation
if(!uris.containsKey(nodeName) || location.equals(LOCAL_NODE_NAME)) {
uris.put(nodeName, location);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

location is URI, LOCAL_NODE_NAME is String, so this expression will always evaluate to false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was a bug, fixed

@chengfang chengfang merged commit 1554684 into wildfly:4.0 Nov 25, 2020
@tadamski tadamski deleted the EJBCLIENT-389 branch July 6, 2022 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants