How to configure JNDI for CVP VXML server for database integration

Overview Steps to configure JNDI on CVP VXML server (running Tomcat)

* Enable database access on your CVP VXML server by installing a compatible JDBC driver * Add the JNDI Context config for the database connection to the context.xml file - for detailed guide view Tomcat 5.5 JNDI Datasource HOW-TO * Restart the Tomcat service Cisco CVP VXMLServer * In your CVP Studio application configure a database Action Element with your newly configured JNDI name (do not include the jdbc/ portion), the SQL Type (Insert, Update, Single, Mutiple) and the SQL Query.

Step by Step guide on how to configure JNDI for a SQL Server 2005
  • Run the executable and install to C:\temp\
  • Copy the file sqljdbc.jar (CVP8) or sqljdbc4.jar (CVP9) to the CVP VXML server's C:\Cisco\CVP\VXMLServer\Tomcat\common\lib folder
  • Note: on CVP 11.5 this folder has changed to C:\Cisco\CVP\VXMLServer\Tomcat\lib\sqljdbc4.jar
  • If you want to use Windows Authentication to your SQL server (instead of SQL authentication) you must also copy C:\temp\sqljdbc_3.0\enu\auth\x86\sqljdbc_auth.dll to the C:\WINDOWS\system32 folder
  • For CVP 9 copy the x86 (32 bit) version of sqljdbc_auth.dll to the C:\Windows\SysWOW64\ Folder
  • Add a similar config to below to your C:\Cisco\CVP\VXMLServer\Tomcat\conf\context.xml file, using your own JNDI name, SQL server address, SQL Database name and username and password

SQL Authentication context.xml example

  
<Resource name="jdbc/cvpdb"
   auth="Container"
   type="javax.sql.DataSource"
   driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
   url="jdbc:sqlserver://123.123.123.123:1433;databaseName=cvp_db;user=myusername;password=Pa$$w0rd"
   />

Note: JNDI name = jdbc/cvpdb in above example. Confirm that your SQL server is setup for mixed mode authentication to allow SQL authentication, i.e. SQL Server and Windows Authentication mode. Make sure that the user configured has required read and / or write access reqiured for the CVP Studio Application

Windows Authentication example

<Resource name="jdbc/cvpdb"
   auth="Container"
   type="javax.sql.DataSource"
   driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
   url="jdbc:sqlserver://123.123.123.123:1433;databaseName=cvp_db;integratedSecurity=true"
   />

Note: Windows Authentication requires the Tomcat VXML service Cisco CVP VXMLServer is configured to logon as a user with local administrive rights on the server. Confirm that this to configured with the required read and / or write access to the database

  • Save the context.xml file and restart the Cisco CVP VXMLServer service.

This example adds extra configuration to remove issues with connections becoming stale

   <Resource name="jdbc/cvp_database"
   maxWait="10000"
   maxActive="16"
   maxIdle="8"
   minIdle="4"
   auth="Container"
   type="javax.sql.DataSource"
   driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
   removeAbandoned="true"
   removeAbandonedTimeout="300"
   testOnBorrow="true"
   validationQuery="SELECT 1"
   timeBetweenEvictionRunsMillis="300000"
   minEvictableIdleTimeMillis="1800000"
   url="jdbc:sqlserver://192.168.1.123:1433;databaseName=cvp_database;user=bob;password=Pa$$w0rd"
   />

http://www.codingpedia.org/ama/tomcat-jdbc-connection-pool-configuration-for-production-and-development/

  • vendors/cisco/uc/cvp/jndi-cvp.txt
  • Last modified: 2018/05/17 19:56
  • by gerardorourke