In this post we will cover the changes that comes along with Liferay Portal 6.2 in liferay-portlet.xml DTD file.
Showing posts with label Liferay Portal Properties. Show all posts
Showing posts with label Liferay Portal Properties. Show all posts
Thursday, December 26, 2013
Sunday, September 1, 2013
Connecting Liferay with Another Database
In the following post we will connect liferay with some third party database (legacy database):
Method 1:
1. Create Service.xml
2. Create ext-spring.xml file as /WEB-INF/src/META-INF/ext-spring.xml
You wont believe but yes we are done!!
Method 2:
1. Make an entry in portal-ext.properties file for another database:
2. create service.xml:
3. create ext-spring.xml file:
done!
NOTE: In both the above methods, we have to create the table manually in the database.
Method 1:
1. Create Service.xml
2. Create ext-spring.xml file as /WEB-INF/src/META-INF/ext-spring.xml
You wont believe but yes we are done!!
Method 2:
1. Make an entry in portal-ext.properties file for another database:
2. create service.xml:
3. create ext-spring.xml file:
done!
NOTE: In both the above methods, we have to create the table manually in the database.
Friday, June 15, 2012
Liferay Ehcache Configuration : Distributed Caching in Liferay
Liferay Portal uses Ehcache to support distributed caching.
1. Enable distributed caching
To enable the distributed caching in liferay portal just set the following property in the portal-ext.properties file.
cluster.link.enabled=true
2. Default Hibernate cache settings
In Liferay Portal, hibernate is configured to use the Ehcache and default caching configurations are specified in the hibernate-clustered.xml file.
Following configuration is used by default for all the Liferay entities.
3. Customizing Hibernate Cache Settings
Let say we want to customize the hibernate cache settings for MBMessage Entity. Following are the steps to achieve our goal -
create a new folder say myEhcache in the [Tomcat Home]/webapps/ROOT /WEB-INF/classes/ folder and copy the default hibernate-clustered.xml file in the myEhcache folder.
Edit the hibernate-clustered.xml file and an entry for MBMessage Entity
4. Add an entry to portal-ext.properties file to provide the path of your custom hibernate-clustered.xml file
net.sf.ehcache.configurationResourceName=/myEhcache/hibernate-clustered.xml
Restart the server.
5. Viewing Cache Configuration in jconsole -
jconsole can be used to view the current cache settings applied. Following is screenshot displaying the cache configuration for MBMessageImpl class:
As we customized the Hibernate cache settings, Cache settings for the clustered environment can also be configured via following files -
1. liferay-single-vm.xml
2. liferay-multi-vm-clustered.xml
Subscribe to:
Posts (Atom)