| Start |
|---|
| Connecting with java.sql.DriverManager This is the simplest way to connect. First, the driver has to be registered with Not that user and password can also be included in the JDBC URL, in which case you don't have to specify them in the |
| Connecting with java.sql.DriverManager and Properties Instead of specifying connection parameters like user and password (see a complete list here (opens new window)) in the URL or a separate parameters, you can pack them into a |
| Connecting with javax.sql.DataSource using a connection pool It is common to use This is code that demonstrates how data sources work: Once you have created a data source by calling this function, you would use it like this: RemarksJDBC URL The JDBC URL can take one of these forms: `**host**` defaults to `localhost`, `**port**` to 5432. To implement failover, it is possible to have several `**host**[:**port**]` entries separated by a comma.
An example: References
|
Read Article
https://develop.horje.com/learn/1434/reference