Goal
This document explains how to create a JDBC Provider and JDBC Data Source in IBM Web Sphere, which can be used by enterprise applications to connect to Denodo Virtual DataPort.
Content
Create a JNDI Data Source that Connects to Denodo
- Copy the Denodo JDBC driver and required libraries to the server where IBM WebSphere is running:
- Create the directory <WEBSPHERE_HOME>/AppServer/lib/denodo_jdbc_driver/
- Copy the following files to the folder created in the previous step:
- <DENODO_HOME>/tools/client-drivers/jdbc/denodo-vdp-jdbcdriver.jar
- <DENODO_HOME>/lib/contrib/commons-dbcp.jar
- <DENODO_HOME>/lib/contrib/commons-pool.jar
- <DENODO_HOME>/lib/contrib/log4j-api.jar
- <DENODO_HOME>/lib/contrib/log4j-core.jar
- <DENODO_HOME>/lib/contrib/log4j-slf4j-impl.jar
- <DENODO_HOME>/lib/contrib/commons-lang.jar
- Open the WebSphere Integrated Solutions Console (by default, https://localhost:9043/ibm/console/logon.jsp) and log in.
- Go to the Data Sources configuration page:
- Resources > JDBC > Data sources
- Select the Scope of the new provider. Scope specifies the level at which the resource definition is visible. If you are not sure about the correct scope value then select the last element in the drop down list. For eg: Node=DESKTOP-9TCI79KNode01, Server=server1
- Click on New… and provide a name under Data source name and to the JNDI name, for instance
- Data source name: denodo_jdbc_data_source
- JNDI name: jndi/denodo_jdbc_data_source
- Click on Next.
- Select Create new JDBC provider and click Next.
- Create the new JDBC Provider with the following information:
- Database type: User-defined
- Implementation class name: org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS (in order to use connection pooling.)
- Name: denodo_jdbc_provider
- Description.
- Click on Next.
- Add the following files to the Classpath. These are the same files added to the websphere server in the first step.
${WAS_LIBS_DIR}/denodo_jdbc_driver/denodo-vdp-jdbcdriver.jar ${WAS_LIBS_DIR}/denodo_jdbc_driver/commons-pool.jar ${WAS_LIBS_DIR}/denodo_jdbc_driver/commons-dbcp.jar ${WAS_LIBS_DIR}/denodo_jdbc_driver/commons-lang.jar ${WAS_LIBS_DIR}/denodo_jdbc_driver/log4j-api.jar ${WAS_LIBS_DIR}/denodo_jdbc_driver/log4j-core.jar ${WAS_LIBS_DIR}/denodo_jdbc_driver/log4j-slf4j-impl.jar |
- Click on Next.
- Clear the checkbox Use this data source in container managed persistence (CMP).
- Click on Next and Finish.
- Click on Save directly to the master configuration.
Configure the new Data source
Now, we are going to configure the custom properties of the data source in order to connect to a Denodo Virtual Database.
- Open the Data Sources configuration page:
- Resources > JDBC > Data sources > Data source name
- Click on Custom properties.
- Edit the value of the following properties. If these properties doesn’t exist, you can add them by clicking on ‘New’:
Property name |
Property value |
user (in the second page) |
<VDP user name> |
password |
<VDP password> |
url (in the second page) |
jdbc:vdb://<hostname>:<port>/<database> |
driver |
com.denodo.vdp.jdbc.Driver |
- Click on Save directly to the master configuration.
- Select the Data source and click on Test connection. The result of the test should be:
- “The test connection operation for data source denodo_jdbc_data_source on server <Server name> at node <Node name> was successful”
References
WebSphere Application Server Data Source Properties
The information provided in the Denodo Knowledge Base is intended to assist our users in advanced uses of Denodo. Please note that the results from the application of processes and configurations detailed in these documents may vary depending on your specific environment. Use them at your own discretion.
For an official guide of supported features, please refer to the User Manuals. For questions on critical systems or complex environments we recommend you to contact your Denodo Customer Success Manager.