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

19 descriptor sample #21

Merged
merged 3 commits into from
Mar 31, 2021
Merged

19 descriptor sample #21

merged 3 commits into from
Mar 31, 2021

Conversation

Michael-A-McMahon
Copy link
Member

This branch adds a new code sample that uses a TNS descriptor to connect Oracle R2DBC to a database.
This branch also add a common DatabaseConfig class that all sample code can share. There was a mistake in the example config.properties that is also fixed: A service name is specified as the value of "SERVICE_NAME", not as the value of "DATABASE".

@@ -114,7 +115,7 @@ public static void main(String[] args) throws URISyntaxException {
.option(ConnectionFactoryOptions.DRIVER, "oracle")
.option(ConnectionFactoryOptions.HOST, HOST)
.option(ConnectionFactoryOptions.PORT, PORT)
.option(ConnectionFactoryOptions.DATABASE, DatabaseConfig.SERVICE_NAME)

Choose a reason for hiding this comment

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

Just curious why only the service name comes from DatabaseConfig? Why not host, port, etc?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, the worst enemy of code reviewers strikes again: There are static imports for HOST, PORT, but not for SERVICE_NAME. I corrected this in the next commit, now SERVICE_NAME is a static import as well.

@jeandelavarene jeandelavarene merged commit e28f32c into main Mar 31, 2021
@jeandelavarene jeandelavarene deleted the 19-descriptor-sample branch March 31, 2021 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants