Ready to get started?

Download a free trial of the HCL Domino Driver to get started:

 Download Now

Learn more:

HCL Domino Icon HCL Domino JDBC Driver

Rapidly create and deploy powerful Java applications that integrate with HCL Domino.

Connect to HCL Domino Data from a Connection Pool in Jetty

The HCL Domino JDBC Driver supports connection pooling: This article shows how to connect faster to HCL Domino data from Web apps in Jetty.

The CData JDBC driver for HCL Domino is easy to integrate with Java Web applications. This article shows how to efficiently connect to HCL Domino data in Jetty by configuring the driver for connection pooling. You will configure a JNDI resource for HCL Domino in Jetty.

Configure the JDBC Driver for Salesforce as a JNDI Data Source

Follow the steps below to connect to Salesforce from Jetty.

  1. Enable the JNDI module for your Jetty base. The following command enables JNDI from the command-line:

    java -jar ../start.jar --add-to-startd=jndi
  2. Add the CData and license file, located in the lib subfolder of the installation directory, into the lib subfolder of the context path.
  3. Declare the resource and its scope. Enter the required connection properties in the resource declaration. This example declares the HCL Domino data source at the level of the Web app, in WEB-INF\jetty-env.xml.

    <Configure id='dominodemo' class="org.eclipse.jetty.webapp.WebAppContext"> <New id="dominodemo" class=""> <Arg><Ref refid="dominodemo"/></Arg> <Arg>jdbc/dominodb</Arg> <Arg> <New class="cdata.jdbc.domino.DominoDriver"> <Set name="url">jdbc:domino:</Set> <Set name="Server"></Set> <Set name="Database">names.nsf</Set> <Set name="Port">3002</Set> <Set name="SSLClientCertType">PEMKEY_FILE</Set> <Set name="SSLClientCert">full_path_of_certificate.pem</Set> <Set name="SSLServerCert">*</Set> </New> </Arg> </New> </Configure>


    The connector requires the Proton component to be installed. Normally, Proton is distributed as part of the AppDev pack. See the HCL documentation for instructions on acquiring and installing Proton or the AppDev pack.

    Once the Proton service is installed and running, you will also need to create a user account and download its Internet certificate. This certificate can be used to set the connector certificate connection properties.

    Authenticating to Domino

    • Server: The name or IP address of the server running Domino with the Proton service.
    • Port: The port number that the Proton service is listening on.
    • Database: The name of the database file, including the .nsf extension.
    • SSLClientCertType: This must match the format of the certificate file. Typically this will be either PEMKEY_FILE for .pem certificates or PFXFILE for .pfx certificates.
    • SSLClientCert: The path to the certificate file.
    • SSLServerCert: This can be set to (*) if you trust the server. This is usually the case, but if you want to perform SSL validation, you may provide a certificate or thumbprint instead. See the documentation for SSLServerCert for details.

    Additional Server Configuration

    The connector supports querying Domino views if any are defined. Before views can be queried by the connector they must be registered with the design catalog.

    Please refer to the Catalog Administration section of the AppDev pack documentation for details on how to do this.

  4. Configure the resource in the Web.xml:

    jdbc/dominodb javax.sql.DataSource Container
  5. You can then access HCL Domino with a lookup to java:comp/env/jdbc/dominodb: InitialContext ctx = new InitialContext(); DataSource mydomino = (DataSource)ctx.lookup("java:comp/env/jdbc/dominodb");

More Jetty Integration

The steps above show how to configure the driver in a simple connection pooling scenario. For more use cases and information, see the Working with Jetty JNDI chapter in the Jetty documentation.