-
Notifications
You must be signed in to change notification settings - Fork 1
Configuring JDBC Objects
Muhammad Hewedy edited this page Mar 21, 2017
·
13 revisions
JDBC API Objects (Connection, Statement and ResultSet) can be configured via JDBC API.
However spwrap exposes 2 of these Objects (Statement and ResultSet), it is more convenient to set these configurations from one easy-to-access single place.
These configurations include:
The configuration done via group on the stored procedure method in the DAO interface, Examples:
@Statement(queryTimeout = 1)
@StoredProc
List<Customer> listCustomers();@Statement(queryTimeout = 1)
@Connection(isolation = SERIALIZABLE)
@StoredProc
List<Customer> listCustomers();@Props(connection = @Connection(isolation = SERIALIZABLE),
statement = @Statement(queryTimeout = 1))
@StoredProc
List<Customer> listCustomers();@ResultSet(fetchSize = 200)
@StoredProc
List<Customer> listCustomers();@Props(connection = @Connection(isolation = SERIALIZABLE),
statement = @Statement(queryTimeout = 1),
resultSet = @ResultSet(fetchSize = Integer.MIN_VALUE))
@StoredProc
List<Customer> listCustomers();