[JAVA-4423] DefaultDnsResolver should conditionally set Context.PROVIDER_URL to "dns:" Created: 10/Dec/21 Updated: 28/Oct/23 Resolved: 11/Jan/22 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | None |
| Fix Version/s: | 4.5.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Valentin Kavalenka | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Minor Change | ||||||||
| Documentation Changes: | Not Needed | ||||||||
| Description |
|
Based on Oracle documentation on DNS Service Provider for the JNDI, Context.PROVIDER_URL ("java.naming.provider.url") may be used to specify a set of DNS servers to use. Currently, our DefaultDnsResolver always sets this environment property to "dns:" when creating InitialDirContext. This means that if a user specifies a URI with the dns scheme as a value of this property to override the set of DNS servers, the driver ignores that. Maybe we should only set Context.PROVIDER_URL if its value is not already a URI with the dns scheme. |
| Comments |
| Comment by Githook User [ 11/Jan/22 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Only override Context.PROVIDER_URL if the default isn't supported (#853)
|