You can connect to a database from a Java application using a data source. There are required settings and optional settings when connecting using a data source. The following table lists the settings.

Table 1. Data source settings
Required settings Optional settings
oeds.setServerName("host"); oeds.setServiceName("name");
oeds.setDatabaseName("name"); oeds.setDescription("text");
oeds.setPortNumber(number); oeds.setDataSourceName("name");
oeds.setUser("user"); oeds.setStatementCacheSize(cache_size);
oeds.setPassword("password"); oeds.setDefaultSchema("name");
Note: The oeds in the settings signifies an OpenEdge data source.

To connect using a data source, specify the connection type (connection, pooled, or XA) and specify the settings.