Chapter 4. Upgrading JBoss Portal 2.4 to 2.6


Before performing any instructions or operations in this chapter, back up your database content and the entire JBoss EAP or JBoss AS directory!

4.1. Manual Upgrade

Although the database schema remains the same in JBoss Portal 2.6, there are several differences that prevent simply deploying the latest version of JBoss Portal, when using a database created for JBoss Portal 2.4. This chapter describes updating a JBoss Portal 2.4 MySQL database for use with JBoss Portal 2.6.

The upgrade procedure can be straightforward:

  1. If you are using the JBoss Portal binary, remove the $JBOSS_HOME/server/default/deploy/jboss-portal.sar/ directory. If JBoss Portal was built from source, remove the $JBOSS_HOME/server/default/deploy/jboss-portal.sar file.

  2. Update the data in the JBoss Portal database, as described in Section 4.1.2, “Updating the Database”.

  3. Deploy JBoss Portal 2.6.

4.1.1. Themes

Themes in JBoss Portal 2.6 have changed since the Portal pages now contain additional areas, such as the Login, Admin, and Dashboard links, on the top right-hand corner:

If you use a default theme that exists in JBoss Portal 2.6, such as renaissance, no configuration should be necessary. Using old themes from JBoss Portal 2.4 may make JBoss Portal 2.6 unusable, for example, not being able to log in. To update custom themes, please refer to those bundled with JBoss Portal as an example.

4.1.2. Updating the Database

All procedures described in the following sections can performed using the AdminPortlet. Treat the directions as guidelines if you need to automate the migration of a large JBoss Portal deployment.

Database schema has not changed between the JBoss Portal 2.4 and 2.6 releases, but certain content that is kept in the databases has changed. Data can be updated manually by using the correct tools for your RDBMS. For example, if you are using a MySQL database, you can use the MySQL Query Browser.

The following instructions refer to a standard JBoss Portal 2.4 deployment. If you named core portlets, portlet instances, or portlet windows differently, you will need to make the appropriate modifications. The following is an example of using the MySQL Query Browser:

4.1.3. Portlet Names

Names of certain core bundled portlets have changed. Destroy the following instances and use the AdminPortlet to recreate them, or, edit the JBP_INSTANCES table as follows:

  1. Change local.portal.CMSPorlet in the PORTLET_REF column to local./portal-cms.CMSPortlet.

  2. Change local.portal.CMSAdminPorlet in the PORTLET_REF column to local./portal-cms.CMSAdminPortlet.

  3. Change local.portal.ManagementPorlet in the PORTLET_REF column to local./portal-admin.AdminPortlet.

The NavigationPortlet from JBoss Portal 2.4 has been removed, and its functionality is now replaced by PageCustomizerInterceptor. All references to the NavigationPortlet should be removed from all portal pages. Remove NavigationPortletInstance using the AdminPortlet, or edit the database as follows:

  1. In the JBP_INSTANCES table, rows containing local.portal.NavigationPortlet in the PORTLET_REF column.

  2. In the JBP_WINDOW table, rows containing NavigationPortletInstance in the INSTANCE_REF column.

  3. In the JBP_OBJECT table, rows containing NavigationPortletWindow in the NAME column.

4.1.4. CMS

In JBoss Portal 2.6 versions, the way the CMS content is displayed changed significantly. For further information, please refer to Chapter 9, Content Integration and Chapter 21, CMS Portlet. Currently there is no need to have more than one instance of the CMSPortlet. The portlet window displays CMS content, not by referring to that portlet instance, but by having the proper content-type defined. The following configuration is in the jboss-portal.sar/conf/data/default-object.xml file:


The following example uses the MySQL Query Browser. Open the JBP_OBJECT_NODE table in your database schema. Look at the PATH column to identify any occurrences of CMS in your JBoss Portal deployment. Identify any row referring to CMSPortletWindow, and remember the number in PK column. The PK number is needed in the following steps:

Go to the JBP_WINDOW table and find a row with the same PK value from the JBP_OBJECT_NODE table. In such a row, replace CMSPortletInstance with a path to your CMS resource. For example, by default, JBoss Portal displays /default/index.html.

Go to the JBP_PORTAL_OBJECT_PROPS table and add a row containing:

  • The PK number remembered from the OBJECT_KEY column.

  • portal.windowContentType in the NAME column.

  • cms in the jbp_VALUE column.

Portlet Content Type and Path to the CMS Resource

You can change the portlet window content type and configure the path to the CMS resource using the AdminPortlet.