Audium Knowledge Base

Knowledgebase Home | Contact Knowledgebase Home | Contact
Search the Knowledgebase Jump to ID Browse by Category
How to create a JNDI database connection in Tomcat for use in Audium applications
Categories: Audium Call Services 3.4.x and 3.5, Audium OpenSDK, Audium Studio (3.4.x)
Article ID: 214
Last updated: February 22, 2007
User Opinions
100% 0% (1 vote)

How would you rate this answer?
Helpful
Not helpful
SUMMARY

This article explains how to create a new JNDI database connection in Tomcat.  These instructions are useful when you would like to use the built-in Database element, or create some custom code that accesses database functionality through JNDI.

SYMPTOMS

Developer would like to create a new JNDI database connection in Tomcat.

RESOLUTION

1) Download and install the com.mysql.jdbc.Driver class, you can download it from this page on mysql.com. We highly recommend using version 3.1.11 (or higher), as version 3.1.10 has compatability problems.  The recommended location for the JAR file that includes this class is TOMCAT/common/lib.  However, you should be able to place the JAR file anywhere in your classpath if this is not an appropriate location for your setup.

2) Add a Data Source under the /Audium context in Tomcat. It is highly recommended that the web-based interface be used for this, since there are a few text fields to fill out, rather than an XML file (see diagram 1 below). You can access the web interface via

http://APP_SERVER_IP:PORT/admin

Expand the "Host (hostname)" branch, and then the "Context (/Audium)" branch. Click on "Data Sources", you can add the data source here.


Diagram 1: Configuring Tomcat

3) The data source should be named "jdbc/ANY_NAME_YOU_CHOOSE". For example, one might choose "jdbc/AudiumDBConnection".

4) Enter the URL of the database in "Data Source URL".

5) Enter the username and password of a database user that has rights to access the database listed in step 4 above.

6) Be sure to click on "Commit Changes" to save this new data source after it has been added.

7) In Audium Builder for Studio, edit the configuration of the Database element in question. Set the JNDI name to the "ANY_NAME_YOU_CHOOSE" portion of what you entered in the Tomcat settings. In the example above, one would enter "AudiumDBConnection". Note that you should not include the "jdbc/" portion here.

Visitor Comments
No visitor comments posted. Post a comment
Related Questions
Attachments
No attachments were found.

Copyright (c) 2005 Audium Corporation. All rights reserved.
Audium Home | Audium Support Center Home | Audium Customer Care Home