Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Overview
ThingWorx can use JDBC drivers to connect to any JDBC compatible database (such as SQL Server, MySQL, Oracle, etc.). It can also be done using the ThingWorx Edge Microserver and the ThingWorx Host/Resource using OLEDB and ODBC if the Database happens to be behind a firewall.
If a JDBC Extension does not exist in ThingWorx for your Database, you can manually add the JDBC driver, by downloading the driver(s) and adding the files to the following location: /Tomcat folder/webapps/Thingworx/WEB-INF/lib
After copying the driver(s), over you must restart ThingWorx (or Tomcat if that is easier).
If you do not want to manually load the JDBC driver to Tomcat and have to restart Tomcat, you can build a Database Extension that includes the JDBC driver & Qlikview Application, and import that extension. The advantage of this approach is that you do not have to manually load the driver, the class load is handled for you, and it is upgrade safe, so you do not have to redeploy the driver when you update the ThingWorx web application. For more information on creating a Database extension, follow the steps below.
Creating a JDBC Extension for ThingWorx
1. Download the example metadata file here.
2. Download the appropriate JDBC driver.
3. Build the extension structure by creating the directory lib/common
4. Place the JAR file in the following directory location: lib/common/<JDBC driver jar file>
5. Modify the name attribute of the ExtensionPackage entity in the metadata.xml file as necessary.
6. Point the file attribute of the FileResource entity to the name of the JDBC JAR file.
7. The metadata also contains a Thing Template. The name is set to MySqlServer, but can be modified as needed.
8. Select the lib folder and metadata.xml file and send to a zip archive.
Hope this helps someone...Thanks for reading!
Regards