Change Password

Please enter the password.
Please enter the password. Between 8-64 characters. Not identical to your email address. Contain at least 3 of: uppercase, lowercase, numbers, and special characters.
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Apply New License

License Detail

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

The MAC address of the server you want to deploy.

Please complete this required field.

Please complete this required field.

Cancel
Apply
ID
Product
Status
Cores
Applied Validity Period(days)
Effective Date
Excpired Date
Mac Address
Apply Comment
Review Comment
Close
Profile
  • Full Name:
  • Phone:
  • Company:
  • Company Email:
  • Country:
  • Language:
Change Password
Apply

You have no license application record.

Apply
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

Product Created On ID Amount (USD) Invoice
Product Created On ID Amount (USD) Invoice

No Invoice

v5.0
Search
    English
    v5.0

      Connection

      Once you have installed the driver and set up an Ultipa instance, you can connect your application to the database.

      You can establish a connection using the configurations from UltipaConfig. See UltipaConfig Attributes.

      Creating a Connection

      Creates a connection using UltipaDriver():

      package com.ultipa.www.sdk.api;
      
      import com.ultipa.sdk.UltipaDriver;
      import com.ultipa.sdk.connect.conf.UltipaConfig;
      import org.assertj.core.util.Lists;
      
      public class Main {
          public static void main(String[] args) throws InterruptedException {
              UltipaConfig ultipaConfig = UltipaConfig.config()
                      // URI example: .hosts(Lists.newArrayList("d3026ac361964633986849ec43b84877s.eu-south-1.cloud.ultipa.com:8443"))
                      .hosts(Lists.newArrayList("192.168.1.85:60061","192.168.1.88:60061","192.168.1.87:60061"))
                      .username("<username>")
                      .password("<password>");
      
              UltipaDriver driver = null;
      
              try {
                  driver = new UltipaDriver(ultipaConfig);
                  Boolean isSuccess = driver.test();
                  System.out.println("Connection succeeds: " + isSuccess);
              } finally {
                  if (driver != null) {
                      driver.close();
                  }
              }
          }
      }
      

      Connection succeeds: true
      

      UltipaConfig Attributes

      The UltipaConfig class includes the following attributes:

      Attribute
      Type
      Default
      Description
      hosts List<String> / Required. A comma-separated list of database server IPs or URLs. The protocol is automatically identified, do not include https:// or http:// as a prefix in the URL.
      username String / Required. Username of the host authentication.
      password String / Required. Password of the host authentication.
      defaultGraph String / Name of the graph to use by default in the database.
      crt String / The file path of the SSL certificate used for secure connections.
      passwordEncrypt String MD5 Password encryption method of the driver. Supports MD5, LDAP and NOTHING.
      connectTimeout Integer 2000 Connection timeout threshold (in milliseconds). By default, each host is attempted three times.
      timeout Integer 15 Request timeout threshold (in second).
      heartbeat Integer 0 The heartbeat interval (in millisecond), used to keep the connection alive. Set to 0 to disable.
      maxRecvSize Integer 32 The maximum size (in MB) of the received data.
      poolConfig PoolConfig / Configures Connection Pooling.
      keepAlive Integer 120 The maximum period (in seconds) of inactivity before sending a keep-alive probe to the host to maintain connection responsiveness (may increase service load).
      keepAliveWithoutCalls Boolean false Activates keep-alive mechanism even during connection inactivity.
      overrideAuthority String / Overrides hostname with ultipa to match server certificate authority.

      Connection Pooling

      Ultipa.poolConfig contains the configuration for using the Apache Commons Pool library. These settings are necessary when connecting to a database to efficiently handle and reuse connections.

      The PoolConfig class includes the following attributes:

      Attribute
      Type
      Default
      Description
      maxTotal int 8 Maximum number of total connections (active + idle) allowed in the pool.
      maxIdle int 8 Maximum number of idle connections in the pool.
      minIdle int 1 Minimum number of idle connections to maintain.
      minEvictableIdleTimeMillis long 1800000L (30 minutes) Minimum time a connection may sit idle before being eligible for eviction.
      timeBetweenEvictionRunsMillis long 600000L (10 minutes) Time interval between eviction runs that check idle connections.
      numTestsPerEvictionRun int 3 Number of connections to test during each eviction run.
      testOnBorrow boolean false Whether to validate a connection before borrowing from the pool.
      testOnReturn boolean true Whether to validate a connection when returning it to the pool.
      testWhileIdle boolean true Whether to validate idle connections during eviction runs.
      maxWaitMillis long -1L Maximum time to wait for a connection when the pool is exhausted (wait indefinitely by default).
      lifo boolean true Whether to use LIFO (last-in-first-out) order for connection retrieval.
      blockWhenExhausted boolean true Whether to block when the pool is exhausted or immediately throw an exception.

      package com.ultipa.www.sdk.api;
      
      import com.ultipa.sdk.UltipaDriver;
      import com.ultipa.sdk.connect.conf.PoolConfig;
      import com.ultipa.sdk.connect.conf.UltipaConfig;
      import org.assertj.core.util.Lists;
      
      public class Main {
          public static void main(String[] args) throws InterruptedException {
              UltipaConfig ultipaConfig = UltipaConfig.config()
                      // URI example: .hosts(Lists.newArrayList("d3026ac361964633986849ec43b84877s.eu-south-1.cloud.ultipa.com:8443"))
                      .hosts(Lists.newArrayList("192.168.1.85:60061","192.168.1.88:60061","192.168.1.87:60061"))
                      .username("<username>")
                      .password("<password>");
      
              PoolConfig poolConfig = ultipaConfig.getPoolConfig();
              poolConfig.setMaxIdle(50);
              poolConfig.setMinIdle(2);
              poolConfig.setMaxTotal(200);
      
              UltipaDriver driver = null;
      
              try {
                  driver = new UltipaDriver(ultipaConfig);
                  Boolean isSuccess = driver.test();
                  System.out.println("Connection succeeds: " + isSuccess);
              } finally {
                  if (driver != null) {
                      driver.close();
                  }
              }
          }
      }
      

      Connection succeeds: true
      
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写