-
Notifications
You must be signed in to change notification settings - Fork 133
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
Conversation
location = Affinity.LOCAL.getUri(); | ||
} else { | ||
location = uris.get(nodeName); | ||
} |
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.
Does it work when exclude-local-receiver
is true (e.g., the user always want invocations to go over network)?
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.
no, it won't respect this setting - I'm working on alternative solution
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.
@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)
8bb4d1f
to
4daf57a
Compare
// we want to prioritize using local invocation | ||
if(!uris.containsKey(nodeName) || location.equals(LOCAL_NODE_NAME)) { | ||
uris.put(nodeName, location); | ||
} |
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.
location
is URI, LOCAL_NODE_NAME
is String, so this expression will always evaluate to false.
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 was a bug, fixed
4daf57a
to
c2ca089
Compare
c2ca089
to
2708717
Compare
@chengfang could you please review