Extending PlainSocketImpl's functionality
Hi,
I'm trying to achieve the following. Make JDBC drivers use a "somewhat" customized socket implementation. In particular, I want them to use sockets where I can control the SO_TIMEOUT.
This kinda rules out extending theSocket class because I don't want to have to modify the JDBC driver code to now instantiate the extendedSocket.
My other option is to then extendSocketImpl and implement aSocketImplFactory to return the extendedSocketImpl with the SO_TIMEOUT set. Well this is undesirable either because then I have to re-implement all the functionality from scratch.
I can try extendingPlainSocketImpl and return the extendedPlainSocketImpl from the factory butPlainSocketImpl is injava.net and has default package access. In order to extend it I have to be injava.net. Which means I have to run my app with-Xbootclasspath. From what I've read this has some licensing implications. Now I can also copy the code from PlainSocketImpl into my own class which is outside ofjava.net. I assume that has the same licensing implication as using-Xbootclasspath.
Is there a reasonably easy way to do this without getting into the licensing issue?
Thanks
Budyanto

