Relational Database Management (RDBMS) Support using XPages

When using XPages with the Relational Database Management Support (RDBMS) feature (found in the Extension Library as a plugin), you can directly connect to any relational database that supports a JDBC driver.

Important aspects of this feature are the following:

  • DBCP (Apache DBCP connection pool) support has been added. You can use it by setting the type to type="dbcp" in the <filename>.jdbc file. For <filename>, you select a name that you would then reference on the XPage. For example, in the XpagesJDBC.nsf, it can be found under /WebContent/WEB-INF/jdbc directory
  • An extension mechanism is provide to choose between simple and DBCP pool if you want to add new Connection Pool projects. This option gives you the flexibility to add pool providers instead of just static providers.
  • The ability to enable logging is available for the RDBMS feature. Currently, logging is only available for the class that is used for the connections pool. This ability can be used as a test to see that the correct pool is being used.

As mentioned, this support feature is based on Java and JDBC. JDBC is the JavaSoft specification of a standard application programming interface (API) that allows Java programs to access database management systems. The JDBC API consists of a set of interfaces and classes written in the Java programming language. As a first step in using this feature with XPages, you must get the correct JDBC driver from the desired database vendor or third party provider.

With this feature, data can be accessed as easily as you can access Domino databases by using the XPages data sources. The data is accessed directly and no synchronization is needed with NSFs. The XPages runtime manages connections through a "connections pool." This includes global or NSF specific connections and connections available using JNDI. Data is then accessed using a set of dedicated XPages data sources. JavaScript and Java API helpers are also provided for programmatically accessing JDBC.

The RDBMS feature currently supports Apache Derby (and others - DB2, Oracle, MySQL, SQL Server). For Windows environments, the feature accesses the ODBC bridge.

Additional information and resources related to RDBMS

For a refresher video on the RDBMS feature, refer to the following link.

There is also an application example, XPagesJDBC.nsf - the XPages Relational Sample, that is available to download as a separate OpenNTF project. The example NSF provides a number of example XPages that demonstrate how to use the RDBMS feature in XPages and use Apache Derby as the example database. The application requires you to install the provided Apache Derby plugin to your Domino server.

If you are new using RDBMS with XPages, this example application can help you become familiar with using the XPages relational database features. As mentioned, this project bundles the example application along with a release of Apache Derby. Apache Derby is an open source relational database. For more information on Apache Derby, refer to the project homepage.