Deploying Unica Segment Central on Tomcat

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

About this task

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.
Use the following guidelines when you deploy Unica Segment Central on Apache Tomcat:
  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.
    • -DSEGMENT_CENTRAL_HOME=<UNICA_HOME>\<Segment_Home>

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

      set "JAVA_OPTS=%JAVA_OPTS% -DSEGMENT_CENTRAL_HOME=<SegmentCentral_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 SegmentCentral.xml file and place in <Tomcat_Install_Home>\instanceN\conf\Catalina\localhost. The following is a sample file
    <?xml version="1.0"?>
    <Context docBase="<SEGMENT_HOME>\SegmentCentral.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. Create the SegmentationEngine.xml file and place in <Tomcat_Install_Home>\instanceN\conf\Catalina\localhost. The following is a sample file
    <?xml version="1.0"?>
    <Context docBase="<SEGMENT_HOME>\SegmentationEngine.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>
    
  4. Inside <PLATFORM_HOME>/tools/bin, encrypt the password using encryptTomcatDBPasswords.bat/sh.
    encryptTomcatDBPasswords.bat -d <PASSWORD> 
  5. Copy the database driver in <Tomcat_Instance_Home>\lib.
  6. Start the Segment Central application by running the following command:
    startup.sh/bat instanceN