On the embedded driver, Connection.setTypeMap() behaves like this (when the connection is not closed):
- if the map argument is null, throw an SQLException with SQLState XJ081
- if the map is not null and not empty, throw an SQLException with SQLState 0A000
- if the map is not null and empty, do nothing
The behaviour on the client driver is this:
- always throw an SQLException with SQLState 0A000
We should try to make the two drivers behave the same way when setTypeMap() is called. (This would also allow us to simplify some of the tests in J2EEDataSourceTest).