Experimenting with this feature, I find that if a client to do an SSL handshake towards a server running a plaintext socket, I get (of course, since the server in that case views the SSL traffic as garbage):
Execution failed because of a Distributed Protocol Error: DRDA_Proto_SYNTAXRM; CODPNT arg = 0; Error Code Value = 3
org.apache.derby.impl.drda.DRDAProtocolException: Execution failed because of a Distributed Protocol Error: DRDA_Proto_SYNTAXRM; CODPNT arg = 0; Error Code Value = 3
This, can't be avoided, but adds to the resource overhead of the handshake, since the DRDAConnThread is terminated, which is wise since we don't know why we got the DRDAProtocolException. Also, I guess the text also should be changed to indicate a possibility of an SSL conection attempt. Any ideas?