I'm not quite sure where to put this, sockets & networking or here? I figured here.
Is it possible to obtain a
JDBC Connection object for SQL operations via a Socket object? I know there is a socket object(s) buried inside that Connection, hence all the socket exceptions you get if it fails to connect. But the DriverManager creates the socket internally. The problem is that I want to use an SSLSocket so the connection to the remote DB is encrypted, using a specific protocol no less. I did read some stuff on encrypted SQL connections - I noticed Oracle allows you to specify encryption as part of the vendor provided stuff you can access via DriverManager properties - but that doesn't appear to be an option with MySQL.
It doesn't seem to be an easy task to do this - far as I can tell it would involve extending some JDBC classes and getting right into the guts of hairy code. But maybe I'm wrong.
Am I?
The alternative is to just use the SSL connection to get to the server and then the server can be rigged up to connect to the database on localhost the usual way and pass serialised objects back and forth I suppose, but that seems immensely ugly to me.
Unfortunately the internet fails because all I get is talk about SocketExceptions when hunting for clues.