Create a custom JDBC DataSource
|
-
Choose
.
The
New JDBC Custom DataSource Creation screen opens.
-
Specify the name of the application that is associated to the JDBC DataSource in the
Application Name field. The system uses this name for the configuration that holds the JDBC DataSource.
-
Specify a unique name for the JDBC DataSource in the
DataSource Name field. It is used when you look up the JDBC DataSource in the naming.
-
Select a driver from the
Driver Name dropdown list.
-
Select the SQL type support from the
SQL Engine dropdown list.
-
Select the transaction isolation level from the
Isolation Level dropdown list.
-
Select the JDBC type support from the
JDBC Version dropdown list.
Depending on the JDBC version you choose, you have to enter the following additional information:
-
If you choose JDBC 1.x support, you have to enter a driver class name, database URL, user name, and password.
-
If you choose JDBC 2.0 support, you have to enter the data source type, ConnectionPool DataSource or XA DataSource. You must also enter the class name for the corresponding implementation provided by the driver and the vendor-specific initialization properties (
serverName,
portNumber , and so on).
You may also specify the class name for the
ObjectFactory , which provides instances of
ConnectionPoolDataSource or
XADataSource objects if there is one implemented by the driver vendor.
-
Choose
Save . The newly created DataSource appears in the list of custom JDBC DataSources.
|
Delete a custom JDBC DataSource
|
-
Select the custom DataSource you want to delete from the
Resources List .
-
Choose
Delete Selected Resource .
|
Define SQL type support
|
-
Select a custom JDBC DataSource from the
Resources List .
-
Choose the
Settings tab in the
Resource Details area.
To specify an SQL type support, select one of the available options from the
SQL Engine dropdown list:
-
Open SQL - the system returns a Database Interface (DBI) CommonConnection. By choosing this option, you choose to use all functions provided by SAP's Open SQL for Java - that is, database vendor independence, SQL semantics, portability and syntax checks,
SQL tracing mechanisms, statement caches, and table buffering.
-
Native SQL - the system returns a DBI DirectConnection. It provides only some of the functions of Open SQL for Java - SQL tracing, and statement caching.
-
Vendor SQL - the system returns a standard JDBC connection without using DBI at all.
To save the selected option, choose
Save .
|
Define transaction isolation level
|
-
Select a custom JDBC DataSource from the
Resources List .
-
Choose the
Settings tab in the
Resource Details .
-
Select one of the available options from the
Isolation Level dropdown list box:
-
None - this level indicates that the database does not support transactions
-
Default - the isolation level of the database in use
Note
The default isolation level for an Open SQL data source is
Read Uncommitted .
-
Read Uncommitted - this level enables transactions to read data that is being modified by other transactions before they either commit or roll back
-
Read Committed - this level enables transactions to read data only after the modifying transaction has committed
-
Repeatable Read - this level guarantees that the data the transaction reads is not being modified by another transaction and is not going to change unless the reading transaction modifies it and commits.
-
Serializable - this level guarantees maximum data integrity, since only one transaction run as a single serial operation can both read and modify the data at a time. Other transactions can access the data only after the serializable transaction has committed
or rolled back.
-
To save the selected option, choose
Save .
|
Manage connection pooling
|
-
Select a JDBC DataSource from the
Resources List .
Choose the
Connection Pooling tab in the
Resource Details .
-
Specify the following parameters:
-
Initial Connections - number of connections that are obtained initially when the DataSource is created.
-
Maximum Connections - number of maximum connections from a single DataSource that are kept in the pool.
-
Maximum Time to Wait for Connection - when the maximum number of supported connections is reached and there are no free connections in the pool, the client waits the specified interval to obtain a connection. If the system does not return a connection
to the pool during the interval, you get an exception thrown.
-
(Optional) Select the
Expiration checkbox, then specify the following parameters:
-
Connection Lifetime - A period in seconds after which the connection expires if it is not in use.
-
Cleanup Interval - An interval in seconds between two consecutive threads run by the system to clean up unused connections.
-
To save the parameters, choose
Save .
|