How to configure AI tomcat caching in Siebel IP2017+ in order to make portlet refresh working
3. 4. 2019
We have written this year about the issue in Siebel 2017+ where when caching on the tomcat side is enabled after refresh of the portlet the rendering of UI freezes. Here you can find the older blog.
In the configuration of the tomcat in the Application Interface (in old terminology webserver with SWSE) we deployed standard caching configuration. The config is web.xml and in linux installation can be typically found in /app/siebel/ai/applicationcontainer/conf. The from tomcat documented caching part was :
<filter>
<filter-name>ExpiresFilter</filter-name>
<filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
<init-param>
<param-name>ExpiresDefault</param-name>
<param-value>access plus 7 days</param-value>
</init-param>
<init-param>
<param-name>ExpiresByType image</param-name>
<param-value>access plus 10 hours</param-value>
</init-param>
<init-param>
<param-name>ExpiresByType text</param-name>
<param-value>access plus 10 hours</param-value>
</init-param>
<init-param>
<param-name>ExpiresByType application/javascript</param-name>
<param-value>access plus 10 hours</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ExpiresFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
The installation of Oracle Siebel CRM 2017+ comes with following vanilla configuration :
<filter>
<filter-name>ExpiresFilter</filter-name>
<filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
<init-param>
<param-name>ExpiresByType image</param-name>
<param-value>access plus 10 minutes</param-value>
</init-param>
<init-param>
<param-name>ExpiresByType text/css</param-name>
<param-value>access plus 10 minutes</param-value>
</init-param>
<init-param>
<param-name>ExpiresByType application/javascript</param-name>
<param-value>access plus 10 minutes</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ExpiresFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
We used the first caching configuration in order to keep the static files in the cache during the working day. As the agile methodology for releases there can be potentially minor release every day. This implicates that the cache needs to be invalidated after working day. The vanilla configuration was not really improving performance and in the chrome basically interpreted as no cache. The performance and user experience is very important in the Siebel Open UI world the we cannot just skip improving caching. After analysis it was found that the refresh issue of portlet is caused by having the dynamic ajax trafic (xhr) request in cache. These also contain the div element ids such as s_2_2_25 which are with each refresh increased. When the UI was rendered there was a mismatch between these ids in cached ajax request and increased ids caused by refresh. So the documented caching for tomcat was causing also dynamic context of Siebel Open UI beeing cached. This is not desired situation.
Oracle after this analysis also issued a document containing recommendation for caching configuration: Siebel Portlet Not Rendered After Refresh In Chrome And Firefox when Caching is enabled in Tomcat (Doc ID 2519350.1)
The correct filter cache cofiguration had to exclude dynamic context in the means to name explicit only static context.
Here is from us proved tomcat ai web.xml configuration for cache : in the /app/siebel/ai/applicationcontainer/conf/web.xml add following section :
<filter-name>ExpiresFilter</filter-name>
<filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
<init-param>
<param-name>ExpiresDefault</param-name>
<param-value>access plus 7 days</param-value>
</init-param>
<init-param>
<param-name>ExpiresByType image</param-name>
<param-value>access plus 10 hours</param-value>
</init-param>
<init-param>
<param-name>ExpiresByType text</param-name>
<param-value>access plus 10 hours</param-value>
</init-param>
<init-param>
<param-name>ExpiresByType application/javascript</param-name>
<param-value>access plus 10 hours</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ExpiresFilter</filter-name>
<url-pattern>*.js</url-pattern>
<url-pattern>*.css</url-pattern>
<url-pattern>*.html</url-pattern>
<url-pattern>*.woff</url-pattern>
<url-pattern>*.png</url-pattern>
<url-pattern>*.gif</url-pattern>
<url-pattern>*.jpg</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
Back to Blog