Chapter 4. Upgrading 2.4 - 2.6

Warning

Before performing any instructions or operations mentioned below remember to backup your database content and the whole application server directory!

4.1. Manual upgrade

Although database schema remains the same in JBoss Portal 2.6 there are several differences that prevent from simple deployment of newest portal version using JBoss Portal 2.4 database. In this chapter we will list major ones and give instructions on how to manually update proper data.

Upgrading procedure can be quite straightforward:

  • Remove $JBOSS_HOME/server/default/deploy/jboss-portal.sar file.
  • Update data in portal database like described in following sections of this chapter
  • Deploy JBoss Portal 2.6

4.1.1. Theme

Themes in 2.6 version changed as now they contain additional areas - the best example is upper right corner where links like "Login", "Admin", "My Dashboard" are visable. If you use default theme like "renaissance" that is present in 2.6, you shouldn't need to do anything. To update your custom themes please refer to those bundled with portal as an example.

Note

If you stay with old theme files you may find JBP 2.6 unusable by not even be able to log in.

4.1.2. Database

Note

All things described in this section can be done using AdminPortlet. Treat this directions more as guideline if you need to automate migration for big portal deployment.

Database schema wasn't changed between 2.4 and 2.6 releases, but still content that is kept in it changed slightly in few areas. You can easily update the data manually by using tools proper for your RDBMS. If you use MySQL you can use MySQL Query Browser that can be downloaded from MySQL website.

Note

Instructions below refer to standard JBoss Portal 2.4 deployment. If you named core portlets, portlet instances or portlet windows differently you will need to make proper modifications in those steps.

4.1.2.1. Portlet names

Names of few core bundled portlets changed. To update them you need to:

In JBP_INSTANCES table:

  • Change "local.portal.CMSPorlet" in PORTLET_REF column to "local./portal-cms.CMSPortlet"
  • Change "local.portal.CMSAdminPorlet" in PORTLET_REF column to "local./portal-cms.CMSAdminPortlet"
  • Change "local.portal.ManagementPorlet" in PORTLET_REF column to "local./portal-admin.AdminPortlet"

Note

Instead of editing database you can destroy those instances in AdminPortlet and recreate them.

NavigationPortlet from JBP 2.4 is not present anymore. Its functionality is now realized by PageCustomizerInterceptor so all references to NavigationPortlet should be removed from all portal pages. You can do it either by cleaning up database content or by using AdminPortlet in Portal interface. In database you should remove:

  • Rows containing "local.portal.NavigationPortlet" in "PORTLET_REF" column in "JBP_INSTANCES" table.
  • Rows containing "NavigationPortletInstance" in "INSTANCE_REF" column in "JBP_WINDOW" table.
  • Rows containing "NavigationPortletWindow" in "NAME" column in "JBP_OBJECT" table.

Note

Instead of editing database you can just remove NavigationPortletInstance using AdminPortlet.

4.1.2.2. CMS

This is probably the less trival part to do directly in database. In JBP 2.6 version the way that CMS content is being displayed changed significantly. Please refer to Content Integration and CMS Portlet chapters for more information. Basically currently there is no need to have more than one instance of CMSPortlet and the portlet window displays CMS content not by referring to that portlet instance but by having proper content-type defined. In "default-object.xml you will find following configuration:

                  
<window>
   <window-name>CMSWindow</window-name>
   <content>
      <content-type>cms</content-type>
      <content-uri>/default/index.html</content-uri>
   </content>
   <region>center</region>
   <height>0</height>
</window>
                  
               

Open JBP_OBJECT_NODE table in your database schema. By looking at PATH column you will easily find any occurances of CMS in your portal deployment

For any row you will identify as referring to CMSPortletWindow in your system remember the number in PK column. It will be needed in next steps

Go to JBP_WINDOW table and find row with the same PK value like the one from JBP_OBJECT_NODE table. In such row replace "CMSPortletInstance" with a path to your CMS resource. For example by default portal is displaying "/default/index.html".

Go to JBP_PORTAL_OBJECT_PROPS table and add a row containing:

  • The number you remembered in "OBJECT_KEY" column.
  • "portal.windowContentType" in "NAME" column.
  • "cms" in "jbp_VALUE" column.

Note

Remember that you can also change portlet window content type and configure path to CMS resource using AdminPortlet