Use thin-style service name syntax for JDBC connections#251
Use thin-style service name syntax for JDBC connections#251yahonda merged 1 commit intorsim:masterfrom
Conversation
b85c100 to
3f1636a
Compare
There was a problem hiding this comment.
Pull request overview
Updates JRuby JDBC connection URL generation to default to Oracle thin-style service name syntax (@//host:port/service_name) to avoid ORA-12505 on Oracle 23c, while documenting an opt-in SID fallback via a :SID prefix.
Changes:
- Switch JDBC URL construction to service-name syntax by default and add
jdbc_connection_urlhelper for URL building. - Update test helpers to use the new URL format in JRuby.
- Add JDBC URL unit specs and document the new behavior (including SID prefix usage) in the README.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
lib/plsql/jdbc_connection.rb |
Refactors raw connection creation and changes default JDBC URL format to service-name syntax. |
lib/plsql/schema.rb |
Updates inline example JDBC URL to match thin-style service-name syntax. |
spec/spec_helper.rb |
Adjusts JRuby test connection URL generation to use @//.../... format. |
spec/support/test_db.rb |
Updates JRuby SYSTEM connection URL used for test DB setup. |
spec/plsql/connection_spec.rb |
Adds unit tests for JDBC URL construction behavior. |
README.md |
Documents JRuby JDBC behavior and how to request SID-style connections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Change the default JDBC connection URL format from SID syntax (jdbc:oracle:thin:@host:port:DB) to service name syntax (jdbc:oracle:thin:@//host:port/DB), which is required for Oracle 12c+ with pluggable databases (PDB). - Extract jdbc_connection_url method for testability - Skip TNS-alias path when database starts with `/` or `:` so that explicit service-name/SID syntax is respected even when TNS_ADMIN is set - Raise ArgumentError when both :database and :url are missing - Add specs for all JDBC URL generation paths - Document JRuby JDBC connection options in README Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7c4afaf to
5ae82ad
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Change the default JDBC connection URL format from SID syntax (
jdbc:oracle:thin:@host:port:DB) to service name syntax (jdbc:oracle:thin:@//host:port/DB), which is required for Oracle 12c+ with pluggable databases (PDB).Changes
jdbc_connection_urlclass method fromcreate_rawfor testability@//host:port/service) for JDBC URLs:(e.g.,database: ":MYSID")/or:so explicit service-name/SID syntax is respected even whenTNS_ADMINis setArgumentErrorwhen both:databaseand:urlare missing