Guest

Cisco Unified Personal Communicator

Create a JNDI Database Connection in Tomcat

Document ID: 71484



Contents

Introduction
Prerequisites
      Components Used
      Conventions
How can I create a JNDI database connection in Tomcat for use in voice applications?
NetPro Discussion Forums - Featured Conversations
Related Information

Introduction

This document explains how to create a new Java naming and directory interface (JNDI) database connection in Tomcat. These instructions help utilize the built-in database element or create custom code that accesses database functionality through JNDI.

Prerequisites

Components Used

The information in this document is based on Cisco Unified Call Services, Universal Edition, and Cisco Unified Call Studio, Universal Edition.

Conventions

Refer to Cisco Technical Tips Conventions for more information on document conventions.

How can I create a JNDI database connection in Tomcat for use in voice applications?

Symptoms: The developer wants to create a new JNDI database connection in Tomcat.

Resolution: Follow these instructions to create a new JNDI database connection in Tomcat:

  1. Download and install the com.mysql.jdbc.Driver class.

    1. You can download it from mysql.com.

    2. We highly recommend Version 3.1.11 (or higher) since Version 3.1.10 has compatibility problems.

    3. The recommended location for the JAR file that includes this class is TOMCAT/common/lib, but you can 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 several text fields need to be filled out, rather than an XML file.

    1. Access the web interface.

    2. Expand the Host (hostname) branch and then the Context (/Audium) branch.

    3. Click Data Sources and add the data source.

      auto_expand-1.gif

  3. The data source must be named jdbc/ANY_NAME_YOU_CHOOSE. For example, you can choose jdbc/DBConnection.

  4. Enter the URL of the database in Data Source URL field.

  5. Enter the username and password of the database user that has the rights to access the database listed in Step 4.

  6. Click the Commit Changes button to save this new data source after it has been added.

  7. In the voice application, edit the configuration of the database element in question.

    1. Set the JNDI name to the ANY_NAME_YOU_CHOOSE portion of the information you entered in the Tomcat settings.

    2. For example, you can enter DBConnection.

      Note: You must not include the jdbc/ portion here.

NetPro Discussion Forums - Featured Conversations

Networking Professionals Connection is a forum for networking professionals to share questions, suggestions, and information about networking solutions, products, and technologies. The featured links are some of the most recent conversations available in this technology.
NetPro Discussion Forums - Featured Conversations for Voice
Service Providers: Voice over IP
Voice & Video: Voice over IP
Voice & Video: IP Telephony
Voice & Video: IP Phone Services for End Users
Voice & Video: Unified Communications
Voice & Video: IP Phone Services for Developers
Voice & Video: General

Related Information



Updated: Jul 03, 2007Document ID: 71484