Skip to content

Commit 7647a1b

Browse files
committed
Use documentation address + misc copy editing
1 parent 8c98def commit 7647a1b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,17 @@ public class HelloServer {
5353
----
5454

5555
The first line of this code is important -- it tells Java to load the Jaybird JDBC driver.
56-
As required by the JDBC specification, at this point driver registers itself with `java.sql.DriverManager`.
56+
As required by the JDBC specification, at this point the driver registers itself with `java.sql.DriverManager`.
5757

5858
Since Java 6 (JDBC 4), explicitly loading the driver using `Class.forName("org.firebirdsql.jdbc.FBDriver")` is no longer necessary, except when the driver is not on the system class path.
5959
Examples where it may be necessary to explicitly load the driver are web applications that include the driver in the deployment (e.g. in `WEB-INF/lib` of the WAR).
6060
There, the driver is not on the system class path, so it will need to be loaded explicitly.
6161

62+
[TIP]
63+
====
64+
Explicitly loading the driver with `Class.forName("org.firebirdsql.jdbc.FBDriver")` may aid in debugging "`__No suitable driver found for jdbc:firebird...__`" errors (e.g. whether the driver is not on the classpath, or it was found but an error occurred during loading or initialization, or -- if the error goes away -- it was not loaded by automatic driver loading).
65+
====
66+
6267
We will leave out usages of `Class.forName` in further examples;
6368
they will work because of automatic driver loading.
6469

@@ -95,7 +100,7 @@ java\
95100
The second statement of the example tells the `java.sql.DriverManager` to open a database connection to the Firebird server running on localhost, and the path to the database is `c:/database/employee.fdb`.
96101

97102
The connection specification consists of the host name of the database server, optionally you can specify a port (by default port 3050 is used).
98-
The host name can be specified using either its DNS name (for example `fb-server.mycompany.com` or just `fb-server`), or its IP address (for example `192.168.0.5`, or `[1080::8:800:200C:417A]` for an IPv6 address).
103+
The host name can be specified using either its DNS name (for example `fb-server.mycompany.com` or just `fb-server`), or its IP address (e.g. `192.0.2.5`, or `[2001:db8::5]` for an IPv6 address).
99104

100105
After the server name and port, the alias or path to the database is specified.
101106
We suggest to specify a database alias instead of the absolute database path.
@@ -105,7 +110,7 @@ The format of the path depends on the platform of the Firebird server.
105110

106111
On Windows, the path must include the drive letter and path, for example `c:/database/employee.fdb`, which points to the employee database that can be found in the `database` directory of drive `C:`.
107112
Java (and Firebird) supports either `/` or `\` (escaped as `\\`) as path separator on the Windows platform.
108-
On Unix and Linux platform, you can use only `/` as the path separator.
113+
On Unix and Linux platforms, you can use only `/` as the path separator.
109114

110115
On Unix platforms the path must include the root, as the path is otherwise interpreted relative to a server-dependent folder.
111116
Having to include the root has the effect that a database in `/var/firebird/employee.fdb` needs to use a double `//` after the host name (and port) in the connection string: `jdbc:firebird://localhost//var/firebird/employee.fdb`.

0 commit comments

Comments
 (0)