Attaching derby-4869-09-ac-abort.diff. This is the first increment of support for Connection.abort(Executor). I will run regression tests.
This patch adds the new abort() method to the JDBC 4.0 physical connections (EmbedConnection40 and NetConnection40). The abort method does the following:
1) Checks for SQLPermission( "callAbort" ).
2) Marks the physical connection as closed so that new work cannot start in it.
3) Runs the rollback() and close() methods inside the Executor.
This patch also includes a basic test of the physical connections in an environment which enjoys the correct SQLPermission.
Follow-on patches should supply additional tests. In particular, the following areas should be explored:
1) Security concerns. Exercise abort() when there is no SecurityManager and when there is a SecurityManager but the correct SQLPermission has not been granted to the caller.
2) Calling abort() on pooled connections.
3) Calling abort() on XA connections.
Touches the following files:
Add abort() logic to the embedded physical connection.
Add abort() logic to the network physical connection.
Add abort() forwarding to the wrapper connections.
Add the appropriate new SQLPermission to Derby's policy files.
Basic test for abort().