|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the type of the result of a call to run. If no result is
returned this type should be Void
public interface TransactionRunnable<T>
The TransactionRunnable
interface should be implemented for
code that needs to be run in a transactional context.
Typical usage is like this:
TransactionRunnable<Void> runnable = new TransactionRunnable<Void>() { public Void run(Connection connection, Object... arguments) throws SQLException { List<Person> personList = (List<Person>)arguments[0]; PreparedStatement ps = connection.prepareStatement("..."); ... return null; } };
SessionRunner
Method Summary | |
---|---|
T |
run(Connection connection,
Object... arguments)
This method is called by a SessionRunner . |
Method Detail |
---|
T run(Connection connection, Object... arguments) throws SQLException
SessionRunner
.
connection
- the database connectionarguments
- a variable list of arguments
SQLException
- thrown if an exception occured.
This will force a rollback of the transactionSessionRunner
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |