Deploying Unica Campaign on Tomcat Application Server
Use the following guidelines when you deploy Unica Campaign on Tomcat:
- HCL Unica products customize the JVM used by Tomcat. You may require to create a Tomcat instance that is dedicated to HCL Unica products if you encounter JVM-related errors
- If you are deploying in a production environment, set the JVM memory heap size
parameters to at least 1024 by adding the following line to the setenv.bat/sh e.g :
set
CATALINA_OPTS=%CATALINA_OPTS% -Xms1024m -Xmx1024m -XX:MaxPermSize=512m.These are the suggested minimum values. Analyze your sizing requirements to determine correct values for your needs. Depending upon system load -Xmx value should be adjusted. Note that a 64-bit application server and JVM are usually necessary for values greater than 2048.
- Modify the
JAVA_OPTIONSparameter to add the following value insetenv.bat/sh.set
JAVA_OPTS=%JAVA_OPTS% -DUNICA_PLATFORM_CACHE_ENABLED=true -Dclient.encoding.override=UTF-8. - When Unica Insights war is deployed on Tomcat, complete the following configuration
in server.xml, where Campaign.war is deployed. Add
relaxedQueryCharsunder Campaign server.xml as mentioned below.<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" relaxedQueryChars="|,[,],\,`,{,},^" /> -
You must add Unica Platform and Unica Campaign data source in Campaign.xml along with the path of Campaign.war to the Unica Campaign Tomcat instance. For example:
<Context docBase="<Campaign_Install_Path>/Campaign/Campaign.war"> <Resource name="<UnicaPlatformDS>" factory="com.unica.manager.tomcat.utils.TomcatDSFactory" auth="Application" type="javax.sql.DataSource" maxActive="30" maxIdle="10" maxWait="10000" username="<db user for Platform schema>" password="<db password>" driverClassName= "<db specific class name>" url="<db specific jdbc url>"/> <Resource name="<campaignPartition1DS>" factory="com.unica.manager.tomcat.utils.TomcatDSFactory" auth="Application" type="javax.sql.DataSource" maxActive="30" maxIdle="10" maxWait="10000" username="<db user for Campaign schema>" password="<db password>" driverClassName= "<db specific class name>" url="<db specific jdbc url> </Context>"/>
This parameter is to increase the size of the HTTP request to avoid campaign flowchart crashes that exceed the default size supported by Tomcat.
- maxHttpHeaderSize="209715200"
- maxPostSize="-1"
java:/comp/env/" when defining
datasource/JNDI.After upgrading Campaign on Apache Tomcat, you must encrypt the password again from the location <Installation_Location>/platform/tools/bin and manually make the changes in XMLs.
You can use the
encryptTomcatDBPasswords utility and encrypt the database
password which is used by the Tomcat Application server internally. It is used to
encrypt database passwords used in Campaign.xml,
unica.xml, and Campaign.xml. The
utility prints the encrypted password in the command line.
The command to run
the utility is: encryptTomcatDBPasswords -d
databasePassword.