[CONJ-50] Support unix domain socket connections on Unix Created: 2013-07-03  Updated: 2013-08-22  Resolved: 2013-07-24

Status: Closed
Project: MariaDB Connector/J
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1.4

Type: Task Priority: Minor
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
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)



 Comments   
Comment by Torsten Krah [ 2013-08-22 ]

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.

Comment by Vladislav Vaintroub [ 2013-08-22 ]

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

Generated at Thu Feb 08 03:12:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.