Skip to content

Commit 3c086b8

Browse files
committed
Misc. improvements connection
1 parent 45e5981 commit 3c086b8

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

‎src/docs/asciidoc/chapters/connection/connection.adoc‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,8 @@ jdbc:firebird:native:employee
473473
[[driver-native-maven]]
474474
===== Maven dependency for native client
475475

476-
When using Jaybird 3 and later, you can use a library to provide the Firebird client library for the `NATIVE` protocol.
477-
For Windows, Linux, and macOS, you can add the https://github.com/mrotteveel/jaybird-fbclient[`org.firebirdsql.jdbc:fbclient`^] dependency on your classpath.
476+
You can use a library to provide the Firebird client library for the `NATIVE` protocol.
477+
For Windows, Linux, and macOS, you can add the https://github.com/mrotteveel/jaybird-fbclient[`org.firebirdsql.jdbc:fbclient`^] dependency to your classpath.
478478
This dependency does not support the `embedded` protocol.
479479

480480
.Native libraries for all supported OS and architectures
@@ -509,7 +509,7 @@ See next sections for other solutions.
509509
[[driver-native-windows]]
510510
===== Windows
511511

512-
For Jaybird 3 and later, we recommend using the solution documented in <<driver-native-maven>>.
512+
TIP: We recommend using the solution documented in <<driver-native-maven>>.
513513

514514
On Windows, you need to make sure that `fbclient.dll` is located on the `PATH` environment variable.
515515
Alternatively, you can specify the directory containing this DLL in the `jna.library.path` system property or the <<connectionproperties-other,connection property>> ``nativeLibraryPath``footnote:first-native[This connection property will only work for the *first* native connection made.].
@@ -526,7 +526,7 @@ If your Java installation is 64-bit, you need a 64-bit `fbclient.dll`, for 32-bi
526526
[[driver-native-linux]]
527527
===== Linux
528528

529-
For Jaybird 3 and later, we recommend using the solution documented in <<driver-native-maven>>.
529+
TIP: We recommend using the solution documented in <<driver-native-maven>>.
530530

531531
On Linux, you need to make sure that `libfbclient.so` is available through the `LD_LIBRARY_PATH` environment variable.
532532

@@ -593,7 +593,7 @@ This can be changed with the `ServerMode` setting in `firebird.conf`.
593593

594594
until:[Jaybird 6]
595595

596-
The `OOREMOTE` type is a JDBC Type 4 specifically for use with OpenOffice.org and LibreOffice.
596+
The `OOREMOTE` type is a JDBC Type 4 driver specifically for use with OpenOffice.org and LibreOffice.
597597
It addresses some differences in interpretation of the JDBC specification, and provides alternative metadata in certain cases to allow OpenOffice.org and LibreOffice to function correctly.
598598

599599
[NOTE]
@@ -622,8 +622,8 @@ To connect to Firebird, use LibreOffice Base with connection option "`Firebird E
622622
=== Connection Pooling
623623

624624
Each time a connection is opened via `DriverManager` or `FBSimpleDataSource`, a new physical connection to the server is opened.
625-
It is closed when the connection is closed.
626-
To avoid the overhead of creating connections, you can use a connection pool implementation to maintain a cache of open physical connections that can be reused between user sessions.
625+
This physical connection is closed when the connection is closed.
626+
To avoid the overhead of creating connections, you can use a connection pool to maintain a cache (pool) of open physical connections that can be reused.
627627

628628
Jaybird does not provide its own connection pool implementation.
629629
If you need a `javax.sql.DataSource` implementation that provides a connection pool, either use the connection pool support of your application server, or consider using https://brettwooldridge.github.io/HikariCP/[HikariCP^], https://commons.apache.org/proper/commons-dbcp/[DBCP^], or https://www.mchange.com/projects/c3p0/[c3p0^].
@@ -709,10 +709,10 @@ private static HikariDataSource initDataSourceAlternative2() {
709709
[[data-source-implementation]]
710710
=== The javax.sql.DataSource implementation
711711

712-
Connection pool implementations, whether provided by a Java EE/Jakarta EE application server or a third-party library, are exposed as an implementation of the `javax.sql.DataSource` interface.
712+
Connection pool implementations, whether provided by a Java EE/Jakarta EE application server or a third-party library, are exposed as an implementation of the `javax.sql.DataSource` interface -- just like "`basic`" data sources.
713713

714-
The most important method exposed by this interface is the `getConnection()` method, which will return a connection based on the configuration of the data source.
715-
For a "`basic`" (non-pooling) data source this will create a new, physical, connection.
714+
The most important method exposed by this interface is the `getConnection()` method, which returns a connection based on the configuration of the data source.
715+
For a "`basic`" (non-pooling) data source, this will create a new, physical, connection.
716716
For a connection pool, this will create a logical connection that wraps a physical connection from the pool.
717717

718718
[NOTE]
@@ -721,10 +721,10 @@ The "`user`" of a connection should not care whether the connection is pooled or
721721
This allows for swapping between a non-pooling and pooling data source in an application without any changes to the code using the data source.
722722
====
723723

724-
When the application is done with a connection, it should call `close()` on the connection.
725-
A connection from a non-pooling data source will be closed.
724+
When the application ("`user`") is done with a connection, it should call `close()` on the connection.
725+
When from a non-pooling data source, the physical connection will be closed.
726726
For a logical connection from a connection pool, `close()` will invalidate the logical connection (which will make it behave like a closed connection), and return the underlying physical connection to the connection pool.
727-
The connection pool will either keep it for re-use, or close the physical connection.
727+
The connection pool will either keep it in the pool for re-use, or close the physical connection (e.g. if the pool has too many idle connections).
728728

729729
[TIP]
730730
====

0 commit comments

Comments
 (0)