Customizing the Ehcache configuration
In Chapter 2, Load Balancing and Clustering Best Practices, we learned about Ehcache replication best practices. We learned about multiple ways to configure Ehcache replication. In this section, we will learn how to provide custom Ehcache configuration to tune the cache according to the needs of the Portal solution using the following steps:
Stop both Liferay Portal nodes if they are running.
Locate the
portal-impl.jar
file in thenode-01\liferay-portal-6.1.1-ce-ga2\ tomcat-7.0.27\webapps\ROOT\WEB-INF\lib
directory ofliferay-node-01
. Copy the JAR file into some temporary directory.Now, using the following command, extract
/ehcache/liferay-single-vm.xml
,/ehcache/liferay-multi-vm-clustered.xml
, and/ehcache/hibernate-clustered.xml
into the temporary directory:jar xf portal-impl.jarehcache/liferay-single-vm.xmlehcache/liferay-multi-vm-clustered.xmlehcache/hibernate-clustered.xml
The preceding command will create the
ehcache
directory and extract three...