Skip to content

Add support for Oracle UCP #23403

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

Closed
wants to merge 5 commits into from
Closed

Add support for Oracle UCP #23403

wants to merge 5 commits into from

Conversation

fabio-grassi-gbs
Copy link
Contributor

Added support for autoconfiguration of Oracle Universal Connection Pool. Fixes gh-12865.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 17, 2020
@@ -21,6 +21,7 @@ dependencies {
optional("com.atomikos:transactions-jta")
optional("com.fasterxml.jackson.core:jackson-databind")
optional("com.google.code.gson:gson")
optional("com.oracle.ojdbc:ucp")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just realized I used the old groupId for Oracle. It would be better replace "com.oracle.ojdbc" with "com.oracle.database.jdbc".

Copy link
Member

Choose a reason for hiding this comment

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

A PR is usually created off a branch so that's a bit unfortunate now but if you add an extra commit on your fork of master and push, this will update this PR automatically.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, done.

@@ -65,6 +65,7 @@ dependencies {
optional("org.codehaus.groovy:groovy-templates")
optional("com.github.ben-manes.caffeine:caffeine")
optional("com.github.mxab.thymeleaf.extras:thymeleaf-extras-data-attribute")
optional("com.oracle.ojdbc:ucp")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just realized I used the old groupId for Oracle. It would be better replace "com.oracle.ojdbc" with "com.oracle.database.jdbc".

@fabio-grassi-gbs fabio-grassi-gbs marked this pull request as ready for review September 17, 2020 22:18
@fabio-grassi-gbs fabio-grassi-gbs marked this pull request as draft September 21, 2020 06:29
@snicoll snicoll self-assigned this Sep 24, 2020
@snicoll
Copy link
Member

snicoll commented Sep 24, 2020

I've started to review and polish this. Unfortunately the use of alises has some limit. UCP requires us to map the driver class name to connection-factory-class-name. DBCP2's BasicDataSource happens to have exactly the same property for something entirely different.

I've created #23480

@fabio-grassi-gbs
Copy link
Contributor Author

fabio-grassi-gbs commented Sep 24, 2020 via email

@snicoll snicoll added status: blocked An issue that's blocked on an external project change type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 24, 2020
@snicoll snicoll added this to the 2.4.x milestone Sep 24, 2020
@snicoll snicoll changed the title Support Oracle UCP (resolves gh-12865) Add support for Oracle UCP Sep 24, 2020
@snicoll snicoll mentioned this pull request Sep 24, 2020
@fabio-grassi-gbs fabio-grassi-gbs marked this pull request as ready for review September 26, 2020 15:01
@snicoll snicoll removed the status: blocked An issue that's blocked on an external project change label Sep 28, 2020
snicoll pushed a commit to snicoll/spring-boot that referenced this pull request Sep 28, 2020
snicoll added a commit to snicoll/spring-boot that referenced this pull request Sep 28, 2020
@snicoll snicoll added for: team-attention An issue we'd like other members of the team to review and removed for: team-attention An issue we'd like other members of the team to review labels Sep 28, 2020
@snicoll snicoll modified the milestones: 2.4.x, 2.4.0-M4 Sep 29, 2020
snicoll pushed a commit that referenced this pull request Sep 29, 2020
snicoll added a commit that referenced this pull request Sep 29, 2020
@snicoll snicoll closed this in a983fb9 Sep 29, 2020
@snicoll
Copy link
Member

snicoll commented Sep 29, 2020

@fabio-grassi-gbs thank you for making your first contribution to Spring Boot.

@fabio-grassi-gbs
Copy link
Contributor Author

It was a pleasure. I like the improvements you made to my code.

@davidkarlsen
Copy link
Contributor

@fabio-grassi-gbs How can one control more advanced configuration settings like onsConfiguration, fastConnectionFailoverEnabled, `validateConnectionOnBorrow´ etc?

@davidkarlsen
Copy link
Contributor

@fabio-grassi-gbs ping?

@fabio-grassi-gbs
Copy link
Contributor Author

You can set any property via application.properties. For instance:

spring.datasource.oracleucp.validateConnectionOnBorrow=false
spring.datasource.oracleucp.connection-properties.autoCommit=false
spring.datasource.oracleucp.fastConnectionFailoverEnabled=true

@snicoll
Copy link
Member

snicoll commented Oct 20, 2020

Thanks @fabio-grassi-gbs.

@davidkarlsen please review the guidelines for contributing and ask questions on StackOverflow or Gitter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Oracle UCP
4 participants