Oracle Portal PDK portlet framework provides two methods for personalization. File based or Database based.
Database Based Personalization
Portlet personalization is saved in a database table. A record is created for every instance of the portlet holding the personalization values. Here are the steps for configuring the portlet to use DB personalization :
- Create a DB scheme that will contain the personalization table. Use JPDK_PREFERENCE_STORE.sql to create it.
- Create a data-source on the AS of the portlets, referring to the scheme holding the Preference Table .
- In the provider XML file,
- Add two sub-entry under the preceding XML entry, in the provider XML files like this :
<connection>jdbc/DBPersonalizationConn</connection> & <table>JPDK_PREFERENCE_STORE</table>where jdbc/DBPersonalizationConn is the data-source defined in the 2nd step.
File Based Personalization
Portlet personalization is saved in a file on file system . A file is created for every instance of the portlet holding the personalization values
This is the default configuration for portlet preferences. The default path of the personalization files are inside the application directory after AS extracts it in the applications directory. This will cause that the preferences are reset after re-deployment of the application as the application directory is completely truncated.
The root path of the files created could be customized. This avoids the issue of resetting the portlet personalization. Here are the steps for customizing the portlet personalization files root path :
- Define a shared path that the preferences will be saved to (Example : \\server\C$\Media\OraclePortal\Preferences\).
- Open the provider XML file, Under the XML tag
<preferenceStore class="oracle.portal.provider.v2.preference.FilePreferenceStore">, add the following entry : <rootDirectory> \\\\server\C$\\Media\\OraclePortal\\Preferences\\</rootDirectory>.