Attaching d5880-1a.diff which moves the Wrapper methods to super-classes where that may enable more reuse.
Unfortunately, EmbedStatement40, EmbedPreparedStatement40 and EmbedCallableStatement40 don't have a common sub-class compiled against Java 5 yet, so the had to keep their separate implementations.
In the brokered classes, however, the implementations in BrokeredStatement40, BrokeredPreparedStatement40 and BrokeredCallableStatement40 could be replaced by a single one in BrokeredStatement.
In EmbedParameterMetaData40, the Wrapper methods were moved to EmbedParameterMetaData30, which made the EmbedParameterMetaData40 class empty so it could be removed.
In the data source classes, the Wrapper methods in EmbedDataSource40, EmbeddedConnectionPoolDataSource40 and EmbeddedXADataSource40 could be replaced by a single implementation in EmbededDataSource. This change also made the data source classes that are not suffixed with "40", implement the full JDBC 4.0 interface. The javadoc comments in the classes were updated to say that.
Because the JDBC 3 data source classes are more capable than before, JDBC4FromJDBC3DataSourceTest had to be updated. It expected calls to the Wrapper methods to result in AbstractMethodErrors when using the JDBC 3 flavour of the data sources, but now they succeed.
Finally, I came across two methods (setBinaryStream() and setCharacterStream()) in EmbedCallableStatement40 that had equivalent implementations in the super-class EmbedPreparedStatement, so I removed them and let EmbedCallableStatement40 inherit them instead.
All the regression tests ran cleanly with the patch.