Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-50

Support unix domain socket connections on Unix

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.4
    • Component/s: None
    • Labels:
      None

      Description

      Since we support pipe connections with 1.1.3, we might also support Unix domain socket connections. ConnectorJ does not provide support for them out of the box (and Java does not support unix domain sockets yet),
      however for ConnectorJ there are a couple of 3rd party JNI based solutions (JUDS, junixsocket). JNI is not very convenient to use, because it requres infrastructure for native compilation and distributing shared libraries.

      A better solution is JNA (Java native access), as eliminates native programming entirely . This would still add an extra runtime dependency on 3rd party for those who like to use unix domain sockets (but the library is well established meanwhile)

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            tkrah Torsten Krah added a comment -

            Its already fixed but to document an alternative which is there in 1.1.3 already:

            As you do already support using a custom SocketFactory, you can already use junixsocket which works well.
            Just write a custom factory which does create junixsockets and add the lib (including the shared object file in the jar file, 1.4 does come with it) to the classpath and you are ready to go.

            Show
            tkrah Torsten Krah added a comment - Its already fixed but to document an alternative which is there in 1.1.3 already: As you do already support using a custom SocketFactory, you can already use junixsocket which works well. Just write a custom factory which does create junixsockets and add the lib (including the shared object file in the jar file, 1.4 does come with it) to the classpath and you are ready to go.
            Hide
            wlad Vladislav Vaintroub added a comment -

            I never used junixsocket myself, neither I wrote any custom socketfactory for mariadb jdbc If you have an example, can you please attach it here

            Show
            wlad Vladislav Vaintroub added a comment - I never used junixsocket myself, neither I wrote any custom socketfactory for mariadb jdbc If you have an example, can you please attach it here

              People

              • Assignee:
                wlad Vladislav Vaintroub
                Reporter:
                wlad Vladislav Vaintroub
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d