Deploying Unica Audience Central on Tomcat

You must follow a set of guidelines when you deploy Unica Audience Central on Apache Tomcat.

Before you begin

Ensure that the version of Apache Tomcat meets the requirements that are described in the Recommended Software Environments and Minimum System Requirements document.
Note: Deployment of EAR file is not supported on Apache Tomcat.

About this task

Use the following guidelines when you deploy Unica Audience Central on Apache Tomcat:

Procedure

  1. From the bin directory, inside the Apache Tomcat installation directory (Inside the <Tomcat_Instance_Home>\instanceN\bin), locate or create the setenv.sh or setenv.bat script appropriate for your operating system in a text editor, and add or modify JAVA_OPTIONS property, and add the following entries. Use a space to separate entries.
    • -DAUDIENCE_HOME=<UNICA_HOME>\<Audience_Home>

      Where <UNICA_HOME> is the path to the top-level directory and <Audience_Home> is the path to the directory where you installed Unica Audience Central.

      set "JAVA_OPTS=%JAVA_OPTS% -DAUDIENCE_HOME=<Audience_Home> 
                      -DUNICA_PLATFORM_CACHE_ENABLED=true"
    • For your installation to support non-ASCII characters, example for Portuguese or for locales that require multi-byte characters, add the following arguments to Generic JVM Arguments at the server level:
      -Dfile.encoding=UTF-8
      -Dclient.encoding.override=UTF-8
  2. Create the AudienceCentral.xml file and place in <Tomcat_Install_Home>\instanceN\conf\Catalina\localhost. The following is a sample file:
    <?xml version="1.0"?>
    <Context docBase="<AUDIENCE_HOME>\AudienceCentral.war">
            <Resource name="UnicaPlatformDS" factory="com.unica.manager.tomcat.utils.TomcatDSFactory" auth="Application" type="javax.sql.DataSource"
                              maxActive="30" maxIdle="10" maxWait="10000"
                              username="<USER_NAME>" password="<ENCRYPTED_PASSWORD>" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
                              url="jdbc:sqlserver://Host:port;databaseName=<Platform_DB_Name>"/>
     
             <Resource name="campaignPartition1DS" factory="com.unica.manager.tomcat.utils.TomcatDSFactory" auth="Application" type="javax.sql.DataSource"
                              maxActive="30" maxIdle="10" maxWait="10000"
                              username="<USER_NAME>" password="<ENCRYPTED_PASSWORD>" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
                              url="jdbc:sqlserver://Host:port;databaseName=<Campaign_Partition1_DB_NAME>"/>
    
             <Resource name="campaignPartition2DS" factory="com.unica.manager.tomcat.utils.TomcatDSFactory" auth="Application" type="javax.sql.DataSource"
                              maxActive="30" maxIdle="10" maxWait="10000"
                              username="<USER_NAME>" password="<ENCRYPTED_PASSWORD>" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
                              url="jdbc:sqlserver://Host:port;databaseName=<Campaign_Partition2_DB_NAME>"/>
    </Context>
    
  3. Inside <PLATFORM_HOME>/tools/bin, encrypt the password using encryptTomcatDBPasswords.bat/sh
    encryptTomcatDBPasswords.bat -d <PASSWORD> 
  4. Copy the database driver in <Tomcat_Instance_Home>\lib.
  5. Start the audience application by running the following command:
    startup.sh/bat instanceN