Request for feedback: jdp-2021-01 Unified Database Coordinates

3 views
Skip to first unread message

Mark Rotteveel

unread,
Aug 29, 2021, 10:07:42 AM8/29/21
to firebi...@googlegroups.com
I'm planning to make some changes to how Jaybird handles 'database
coordinates' (simply said: how it identifies the server and database to
use).

I'd appreciate some feedback on jdp-2021-01 which details these changes:
https://github.com/FirebirdSQL/jaybird/blob/properties-redesign/devdoc/jdp/jdp-2021-01-unified-database-coordinates.md


NOTE: Above link is will disappear once I merge or delete this branch.
It will likely become
https://github.com/FirebirdSQL/jaybird/blob/master/devdoc/jdp/jdp-2021-01-unified-database-coordinates.md
after the merge.

Mark
--
Mark Rotteveel

amolna...@gmail.com

unread,
Aug 31, 2021, 8:43:51 AM8/31/21
to firebird-java
Hi Mark!

If I can understand correclty this is just internalk change, will not affect how we use Jaybird/JDBC. Or the changes will break some kind of usage?
BTW I use case #1 : JDBC URLs, optionally with connection properties.

Mark Rotteveel

unread,
Aug 31, 2021, 9:01:11 AM8/31/21
to firebi...@googlegroups.com
On 31-08-2021 14:43, amolna...@gmail.com wrote:
> Hi Mark!
>
> If I can understand correclty this is just internalk change, will not
> affect how we use Jaybird/JDBC. Or the changes will break some kind of
> usage?
> BTW I use case #1 : JDBC URLs, optionally with connection properties.

It will affect the data sources in org.firebirdsql.ds. Specifically,
FBConnectionPoolDataSource and FBXADataSource will now get an option to
specify serverName and portNumber, property database is deprecated in
favour of databaseName. FBSimpleDataSource undeprecates databaseName and
deprecates database. For all three, you can now choose either to just
specify the databaseName with an URL of the database (without
jdbc:firebird[sql]:[subprotocol:] prefix), or use serverName +
portNumber + databaseName to specify host, port and database path/alias.

Generally, the change is expected to be backwards compatible, but there
could be some edge cases where this might result in different behaviour
(or a failure to connect). Biggest difference is probably when using
FBSimpleDataSource and relying on it using localhost as default instead
of setting it explicitly. If you use a Windows filepath, this could
result in a connection failure (e.g. the driver letter might get
interpreted as a hostname), though I will see if I can avoid or at least
reduce occurrence of that problem

For JDBC URLs, fundamentally nothing changes, but you get a few more
options like specifying coordinates through connection properties, and
it will become possible to specify for example jdbc:firebird:<alias> and
it will connect to localhost (this will also work for Linux filepaths,
but probably not for Windows, see above).

In addition, when using the native protocol, it will be possible to use
the new fbclient protocol strings, e.g.
jdbc:firebird:native:xnet://path-to-db

Mark

> On Sunday, 29 August 2021 at 16:07:42 UTC+2 ma...@lawinegevaar.nl wrote:
>
> I'm planning to make some changes to how Jaybird handles 'database
> coordinates' (simply said: how it identifies the server and database to
> use).
>
> I'd appreciate some feedback on jdp-2021-01 which details these
> changes:
> https://github.com/FirebirdSQL/jaybird/blob/properties-redesign/devdoc/jdp/jdp-2021-01-unified-database-coordinates.md
> <https://github.com/FirebirdSQL/jaybird/blob/properties-redesign/devdoc/jdp/jdp-2021-01-unified-database-coordinates.md>
>
>
>
> NOTE: Above link is will disappear once I merge or delete this branch.
> It will likely become
> https://github.com/FirebirdSQL/jaybird/blob/master/devdoc/jdp/jdp-2021-01-unified-database-coordinates.md
> <https://github.com/FirebirdSQL/jaybird/blob/master/devdoc/jdp/jdp-2021-01-unified-database-coordinates.md>
>
> after the merge.
>
> Mark
> --
> Mark Rotteveel
>
> --
> You received this message because you are subscribed to the Google
> Groups "firebird-java" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to firebird-jav...@googlegroups.com
> <mailto:firebird-jav...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/firebird-java/5e052ee1-415e-4724-a1df-0cc1ca187bc8n%40googlegroups.com
> <https://groups.google.com/d/msgid/firebird-java/5e052ee1-415e-4724-a1df-0cc1ca187bc8n%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Mark Rotteveel
Reply all
Reply to author
Forward
0 new messages