Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#32 create socket control

open
nobody
None
5
2002-06-18
2002-06-18
Denis Bohm
No

I would like the ability to control the socket creation so
that I can supply a secure socket.

If MysqlIO had a no-args constructor, and a separate
method to do the work of the current constructor then I
could derive my own connection and override
createNewIO to return my own derived class of
MysqlIO. Right now that doesn't work because the
socket creation code is in the MysqlIO constructor and
can't be overridden.

Alternatively, if I could pass in a SocketFactory to a
connection that would handle the issue as well.

Am I missing something? Is there some way to do this
without changing the sources?

I'm happy to submit a patch if someone can tell me
which approach is most likely to be considered for
inclusion.

Discussion

  • Mark Matthews
    Mark Matthews
    2002-06-24

    Logged In: YES
    user_id=116907

    I've been looking at doing this for awhile, now. Let me do a
    little re-factoring, and I'll throw in an SSLSocket for good
    measure.

     
  • Denis Bohm
    Denis Bohm
    2002-06-24

    Logged In: YES
    user_id=320183

    That sounds great.

    BTW: Just wanted to note that I'm not using SSL - I have my
    own secure socket code that forwards through SSH. So
    adding an interface specifically for SSL wouldn't deal with my
    case. But being able to provide a SocketFactory would.

     
  • Logged In: NO

    Sorry this has taken so long. MySQL Connector/J 3.0.1 (to
    be released as soon as it passes the testsuite today,
    probably sometime tomorrow) will have this ability.