Uploaded image for project: 'EXASOL Roadmap'
  1. EXASOL Roadmap
  2. EXASOL-2934

JDBC: Support for Custom Sockets

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: Exasol 7.1.0
    • Component/s: None
    • Labels:
      None

      Description

      New Feature

      The JDBC driver now supports the CommonDataSource interface from JDBC.
      In the EXADataSource you can pass arguments using the setProperty() method:

      EXADataSource ds = new EXADataSource();
      ds.setProperty("socketfactory", "myTool.MySocketFactory");
      ds.setProperty("user", "mydbuser");
      ...

      Additionally, the JDBC driver includes an Exasol-specific implementation of the SocketFactory interface: EXASocketFactory.

      Using the Exasol specific method "createCustomSocket(InetAddress host, int port, int timeout) " allows you to connect with a specified timeout.

      public abstract class EXASocketFactory extends SocketFactory {
          public abstract Socket createCustomSocket(InetAddress host, int port, int timeout) throws IOException;
      

      When more than one host is specified in a connection string, the connect attempts to each of these hosts are made using the SocketFactory specified by the user and the timeout (if given) until one host is connected.

        Attachments

          Activity

            People

            Assignee:
            CaptainEXA Captain EXASOL
            Reporter:
            CaptainEXA Captain EXASOL
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: