I'm using jOOQ v2.6 as I'm using SQL Server 2008 R2 and there is a bug in jOOQ v3.1 which causes code generation to fail. (I'm aware this will be fixed in v3.2).
From the manual:
// Create a new record
BookRecord book1 = create.newRecord(BOOK);
// Insert the record: INSERT INTO BOOK (TITLE) VALUES ('1984');
book1.setTitle("1984");
book1.store();
If store() fails, a DataAccessException is thrown. In my case I would simply like the process to sleep until either the CRUD operation works, or I observe the issue and intervene. This means that I need to wrap every instance of BookRecord.store() in a try/catch. This then applies to all CRUD operations, across all UpdatableRecords.
Is there a simple way that I can handle all CRUD DataAccessExceptions for all generated Record types, without having to remember to implement the same exception handler over and over again?