Hi,
Last week i got a recommendation from Oracle support on some issues in our environment to change portlet persistent store from file to database. By default portlets store their state in file at OS level it is recommended for high availability and specially in a cluster environment to use database as a persistence store.
You can verify the portlets current persistent on INFO page of portlet which has a the following URL syntax
http://server-name:port/portlet-name/info
As you can see in following screen shot the persistent store is set to File.
Changing Persistent store
It is a 3 step process
Add a environment entry in web.xml to tell portlet to use database as persistent store
Step 2:
Run Persistence migration utility as oracle os user make sure you set the JAVA_HOME variable to correct Java home.
Step 3:
Change metadata-store to database jndi as shown in the screen shot
Test the new changes by going to the Portlet info page
Verify the portlet appearance in MDS repository in EM FMW
Register the Portlet again, delete the portlet from webcenter page and add again
Have a nice day,
Zeeshan Baig
Last week i got a recommendation from Oracle support on some issues in our environment to change portlet persistent store from file to database. By default portlets store their state in file at OS level it is recommended for high availability and specially in a cluster environment to use database as a persistence store.
You can verify the portlets current persistent on INFO page of portlet which has a the following URL syntax
http://server-name:port/portlet-name/info
As you can see in following screen shot the persistent store is set to File.
Changing Persistent store
It is a 3 step process
- Change setting in web.xml file
Run Persistence migration utility Change meta-data-storage settings in adf-config.xml
Add a environment entry in web.xml to tell portlet to use database as persistent store
Step 2:
Run Persistence migration utility as oracle os user make sure you set the JAVA_HOME variable to correct Java home.
echo $JAVA_HOME $java -classpath /u01/Oracle/Middleware/Oracle_WC1/webcenter/modules/oracle.portlet.server_11.1.1/oracle-portlet-api.jar:/u01/Oracle/Middleware/Oracle_WC1/webcenter/modules/oracle.portlet.server_11.1.1/wsrp-container.jar:/u01/Oracle/Middleware/wlserver_10.3/server/lib/ojdbc6.jar oracle.portlet.server.containerimpl.PersistenceMigrationTool -sourceType file -destType db -sourcePath /u01/Oracle/Middleware/Oracle_WC1/portal/portletdata -destUsername dev_portlet -destPassword myPassword -destDatabase mydatabase:1521:mySID -debug
Step 3:
Change metadata-store to database jndi as shown in the screen shot
Test the new changes by going to the Portlet info page
Verify the portlet appearance in MDS repository in EM FMW
Register the Portlet again, delete the portlet from webcenter page and add again
Have a nice day,
Zeeshan Baig
Humm... Looks familiar as well. :)
ReplyDeleteyeah very familiar ;)
ReplyDeleteHi Zeeshan,
ReplyDeleteI am using a MS SQL 2005 database. The connection string in your post does not work with SQL Server. Do you know what syntax to use?
I was able to figure it out for SQL Server. Here it is for future reference:
ReplyDelete-destDatabase "jdbc:sqlserver://mydatabaseServerName:1433;databaseName=myDatabaseName"
Note, you need to include the classpath for the sql jdbc driver as well as set the destination driver like this:
-destDriver com.microsoft.sqlserver.jdbc.SQLServerDriver, just before the -destDatabase parameter.
Hi Shailesh,
ReplyDeleteThanks for update
ZB