Table of Contents
Sun, JavaServer, JSP, Java, JMX, JDK, Java runtime environment, J2EE, JVM, Javadoc, 100% Pure Java, JDBC, and JavaScript are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
JBoss is a registered trademark of Red Hat, Inc. in the U.S. and other countries.
Red Hat is a registered trademark of Red Hat, Inc. in the United States and other countries.
Oracle is a registered trademark of Oracle International Corporation.
Microsoft, Windows, Active Directory, and SQL Server are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
UNIX is a registered trademark of The Open Group.
MySQL is a trademark or registered trademark of MySQL AB in the U.S. and other countries.
Apache is a trademark of The Apache Software Foundation.
Mac and Mac OS are trademarks of Apple Inc., registered in the U.S. and other countries.
All other trademarks referenced herein are the property of their respective owners.
![]() |
Many IT organizations look to achieve a competitive advantage for the enterprise by improving business productivity and reducing costs. Today's top enterprises are realizing this goal by deploying enterprise portals within their IT infrastructure. Enterprise portals simplify access to information by providing a single source of interaction with corporate information. Although today's packaged portal frameworks help enterprises launch portals more quickly, only JBoss® Portal can deliver the benefits of a zero-cost open source license, combined with a flexible and scalable underlying platform.
JBoss Portal provides an open source and standards-based environment for hosting and serving a portal's Web interface, publishing and managing its content, and customizing its experience. It is entirely standards-based, and supports the JSR-168 Portlet Specification, which allows you to easily plug-in standards-compliant portlets to meet your specific portal needs. JBoss Portal is available through the business-friendly LGPL open source license, and is supported by JBoss Enterprise Middleware Professional Support and Consulting. JBoss support services are available to assist you in designing, developing, deploying, and ultimately managing your portal environment. JBoss Portal is currently developed by JBoss Enterprise Middleware developers, and community contributors.
The JBoss Portal framework and architecture include the portal container, and support a wide range of features, including standard portlets, single sign-on, clustering, and internationalization. Portal themes and layouts are configurable. Fine-grained security administration -- down to portlet permissions -- rounds out the security model.
JBoss Portal Resources:
The JBoss Portal team encourages you to use this guide to install and configure JBoss Portal. If you encounter any configuration issues or simply want to take part in our community, we would love to hear from you in our forums.
The following list details features found in this release of JBoss Portal. For a technical view of the JBoss Portal features, refer to the Project Roadmap and Task List .
Technology and Architecture
Single Sign On
LDAP
Supported Standards
Portal and Portal Container
Themes and Layouts
User and Group Functionality
Permissions Management
Content Management System
This guide is aimed towards portlet developers, portal administrators, and those wishing to implement and extend the JBoss Portal framework. For end-user documentation, please refer to the JBoss Portal User Manual from the JBoss Portal Documentation Library .
We would like to thank the developers that participate in the JBoss Portal project.
Specifically:
Contributions of any kind are always welcome. You can contribute by providing ideas, filing bug reports, producing code, designing a theme, writing documentation, and so on. If you think your name is missing from this page, please let us know.
The following chapter details hardware and software versions that are compatible with JBoss Portal. The hardware and software listed has either been tested, or reported as working by users. Before reporting a problem, make sure you are using compatible hardware and software.
If you successfully installed JBoss Portal on versions not listed here, please let us know so it can be added to this section.
JBoss Portal is 100% Pure Java™, and therefore it is interoperable with most operating systems capable of running a Java Virtual Machine (JVM™), including Linux®, Windows®, UNIX® operating systems, and Mac OS X.
JBoss Portal 2.6.6 is tested with JBoss Application Server (AS) 4.2.3, and Boss Enterprise Application Platform (EAP) 4.3. It is highly recommended that customers who have access to the JBoss Customer Support Portal (CSP) use JBoss EAP 4.3 (It is mandatory to get access to professional support). Customers who do not have access to the JBoss CSP should use JBoss AS.
JBoss AS versions 4.0.x are not supported.
JBoss Portal is database-agnostic. The following list outlines known-to-be-working database vendor and version combinations:
JBoss Portal employs Hibernate as an interface to a Relational Database Management System (RDBMS). Most Relational Database Management Systems supported by Hibernate will work with JBoss Portal.
Depending on your needs, there are several different methods to install JBoss Portal. Pre-configured clustered versions (JBoss Portal Binary (Clustered)) are available from the JBoss Portal Downloads page. Clustered versions of JBoss Portal must be deployed in the JBOSS_INSTALLATION_DIRECTORY/server/all/deploy/ directory. All JBoss AS instances must reference the same datasource. Refer to Section 2.3.2.2, “Operating System Environment Settings” for details on how to configure JBoss Portal for clustering.
An environment variable, JBOSS_HOME, is configured in Section 2.3.2.2, “Operating System Environment Settings”. References to $JBOSS_HOME assume this to be your JBOSS_INSTALLATION_DIRECTORY.
This is the easiest and fastest way to get JBoss Portal installed and running. The JBoss Portal and JBoss AS bundle contains JBoss AS, JBoss Portal, and the embedded Hypersonic SQL database. To install the JBoss Portal and JBoss AS bundle:
Get the bundle: the bundle is available from the JBoss Portal Downloads page. Bundles use the JBoss Portal + JBoss AS naming convention.
Extract the bundle: extract the ZIP archive. It does not matter which directory is used. On Windows, the recommended directory is C:\jboss-version-number.
Start the server: change into the JBOSS_PORTAL_INSTALLATION_DIRECTORY/bin/ directory. On Windows, execute run.bat. On Linux, run the sh run.sh command. To specify a configuration to use, for example, the default configuration, append the -c default option to the run.bat or sh run.sh commands.
Log in to JBoss Portal: using a Web browser, navigate to http://localhost:8080/portal to open the JBoss Portal homepage. Log in using one of the two default accounts: username user, password user, or username admin, password admin.
Tables are automatically created the first time JBoss Portal starts. When deployed for the first time, JBoss Portal checks for the existence of the initial tables, which have not been created yet. This causes errors such as the following, which can safely be ignored:
WARN [JDBCExceptionReporter] SQL Error: -22, SQLState: S0002 ERROR [JDBCExceptionReporter] Table not found in statement ... WARN [JDBCExceptionReporter] SQL Error: 1146, SQLState: 42S02 ERROR [JDBCExceptionReporter] Table 'jbossportal.jbp_cms_repositoryentry' doesn't exist WARN [JDBCExceptionReporter] SQL Error: 1146, SQLState: 42S02 ERROR [JDBCExceptionReporter] Table 'jbossportal.jbp_cms_version_refs' doesn't exist
The binary package typically consists of the jboss-portal.sar/ directory, documentation such as the JBoss Portal User Guide and the JBoss Portal Reference Guide, and a set of pre-configured Datasource descriptors that allow JBoss Portal to communicate with an external database. This installation method is recommended for users who already have JBoss EAP or JBoss AS installed, or those who need to install JBoss Portal in a clustered environment.
The binary download is available from the JBoss Portal Downloads page. Look for the JBoss Portal Binary package. Once the binary ZIP file has been downloaded and extracted, the folder hierarchy will look similar to the following:
![]() |
Files contained in this download are used in later sections. Download and extract the JBoss Portal binary ZIP file before proceeding.
Before deploying JBoss Portal, make sure you have JBoss EAP or JBoss AS installed. Customers who have access to the JBoss Customer Support Portal (CSP) are advised to download and install JBoss EAP 4.3. Customers who do not have access to the JBoss CSP are advised to use JBoss AS. For JBoss AS installation instructions, please refer to the JBoss AS Installation Guide.
Only use the JBoss EAP and JBoss AS ZIP file versions. DO NOT ATTEMPT to deploy JBoss Portal on the installer version of JBoss EAP or JBoss AS.
For JBoss EAP, JBoss AS, and build targets to work, you must configure a JBOSS_HOME environment variable. This environment variable must point to the root directory of the JBoss EAP or JBoss AS installation directory, which is the directory where the JBoss EAP or JBoss AS files were extracted to.
On Windows, this is accomplished by going to Start > Settings > Control Panel > System > Advanced > Environment Variables. Under the System Variables section, click New. Set the JBOSS_HOME environment variable to the location of your JBoss EAP or JBoss AS installation directory:
![]() |
To configure the JBOSS_HOME environment variable on Linux:
Add the following line to the ~/.bashrc file. Note: this must be configured while logged in as the user who runs JBoss EAP or JBoss AS:
export JBOSS_HOME=/path/to/jboss/installation/
Run the following command to enable the JBOSS_HOME environment variable:
source ~/.bashrc
If you are running JBoss EAP, configure the JBOSS_HOME environment variable to point to the /path/to/jboss-eap-version/jboss-as/ directory.
A database is required for JBoss Portal to run. JBoss EAP and JBoss AS include an embedded Hypersonic SQL database that JBoss Portal can use; however, this is only recommended for developer use. The following databases are recommended for production use, and have had test suites run against them: MySQL® 4 and 5, Microsoft® SQL Server®, PostgreSQL 8, and Oracle® Database 9 and 10. JBoss Portal can use any database that is supported by Hibernate.
To configure a database to use with JBoss Portal:
Create a new database: this guide assumes that the new database is called jbossportal.
Grant access rights for a user to the jbossportal database: JBoss Portal needs to create tables and modify table data. Grant access rights to a desired user to the jbossportal database. Configure the same username and password in the Datasource descriptor.
Deploy an RDBMS JDBC™ connector: an RDBMS JDBC connector is required for JBoss Portal to communicate with a database. Copy the connector into the $JBOSS_HOME/server/default/lib/ directory. For example, an RDBMS JDBC connector for MySQL can be download from http://www.mysql.com/products/connector/j/. For the correct RDMBS JDBC connector, please refer to the database documentation.
The JBoss Portal binary download that was extracted in Section 2.2.1.1, “Getting the Binary”, contains pre-configured Datasource descriptors for the more popular databases. Datasource descriptors are provided for the MySQL 4 and 5, PostgreSQL, Microsoft SQL Server, and Oracle databases, and can be found in the setup subdirectory where the JBoss Portal binary was extracted to:
![]() |
Copy the Datasource descriptor that matches your database into the $JBOSS_HOME/server/configuration/deploy/ directory, where configuration is either all, default, minimal or production. The production configuration only exists on JBoss EAP, and not JBoss AS. For example, if you are using the all configuration, copy the Datasource descriptor into the $JBOSS_HOME/server/all/deploy/ directory.
After the Datasource descriptor has been copied into the deploy directory, make sure the user-name, password, connection-url, and driver-class, are correct for your chosen database. Datasource descriptor files can be deployed to test before being used in production. The following is an example Datasource descriptor for a PostgreSQL database:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>PortalDS</jndi-name>
<connection-url>jdbc:postgresql:jbossportal</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>portal</user-name>
<password>portalpassword</password>
</local-tx-datasource>
</datasources>
For further details about Datasource descriptors, please refer to the JBoss JDBC Datasource Wiki page.
To start JBoss EAP or JBoss AS and deploy JBoss Portal:
Datasource descriptor: if you have not done so already, change into the setup subdirectory where the JBoss Portal binary was extracted to. Copy the correct Datasource descriptor file (*-ds.xml) you modified in the previous steps into the $JBOSS_HOME/server/configuration/deploy/ directory.
Start the server: change into the $JBOSS_HOME/bin/ directory. On Windows, execute run.bat. On Linux, run the sh run.sh command. To specify a configuration to use, for example, the default configuration, append the -c default option to the run.bat or sh run.sh commands.
Log in to JBoss Portal: using a Web browser, navigate to http://localhost:8080/portal to open the JBoss Portal homepage. Log in using one of the two default accounts: username user, password user, or username admin, password admin:
![]() |
Tables are automatically created the first time JBoss Portal starts. When deployed for the first time, JBoss Portal checks for the existence of the initial tables, which have not been created yet. This causes errors such as the following, which can safely be ignored:
WARN [JDBCExceptionReporter] SQL Error: -22, SQLState: S0002 ERROR [JDBCExceptionReporter] Table not found in statement ... WARN [JDBCExceptionReporter] SQL Error: 1146, SQLState: 42S02 ERROR [JDBCExceptionReporter] Table 'jbossportal.jbp_cms_repositoryentry' doesn't exist WARN [JDBCExceptionReporter] SQL Error: 1146, SQLState: 42S02 ERROR [JDBCExceptionReporter] Table 'jbossportal.jbp_cms_version_refs' doesn't exist
The JBoss Portal source files can be obtained from the JBoss Portal Downloads page. The source files download uses a JBoss Portal Source Code naming convention. As well, the sources can be obtained from SVN. The latest sources for the 2.6.x versions are located at http://anonsvn.jboss.org/repos/portal/branches/JBoss_Portal_Branch_2_6.
Several modules have been extracted from the JBoss Portal SVN repository. These modules have a different lifecycle and a different version scheme. The following is a list of modules used in JBoss Portal 2.6.6, and the locations of their source code:
JBoss Portal Common 1.1.2: http://anonsvn.jboss.org/repos/portal/modules/common/tags/JBP_COMMON_1_1_2
JBoss Portal Web 1.1.0: http://anonsvn.jboss.org/repos/portal/modules/web/tags/JBP_WEB_1_1_0
JBoss Portal Test 1.0.1.SP1: http://anonsvn.jboss.org/repos/portal/modules/test/tags/JBP_TEST_1_0_1_SP1
JBoss Portal Portlet 1.0.3: http://anonsvn.jboss.org/repos/portal/modules/portlet/tags/JBP_PORTLET_1_0_3
JBoss Portal Identity 1.0.4: http://anonsvn.jboss.org/repos/portal/modules/identity/tags/JBP_IDENTITY_1_0_4
After checking out the source from SVN, or after extracting the JBoss Portal Source Code ZIP file, a directory structure similar to the following will be created:
![]() |
If the source files were obtained from SVN, change into the trunk/src/ directory to see the directories from the above image. As well, there is an empty thirdparty directory. This directory contains files after building the JBoss Portal source code (refer to Section 2.3.3, “Building and Deploying from the Sources”). For more information about the JBoss Portal SVN repository, and accessing different versions of the JBoss Portal codebase, refer to the JBoss Portal SVN Repo page on the JBoss Wiki.
Before deploying JBoss Portal, make sure you have JBoss EAP or JBoss AS installed. Customers who have access to the JBoss Customer Support Portal (CSP) are advised to download and install JBoss EAP 4.3. Customers who do not have access to the JBoss CSP are advised to use JBoss AS. For JBoss AS installation instructions, please refer to the JBoss AS Installation Guide.
Only use the JBoss EAP and JBoss AS ZIP file versions. DO NOT ATTEMPT to deploy JBoss Portal on the installer version of JBoss EAP or JBoss AS. We are currently working on aligning the Application installer with JBoss Portal.
For JBoss EAP, JBoss AS, and build targets to work, you must configure a JBOSS_HOME environment variable. This environment variable must point to the root directory of the JBoss EAP or JBoss AS installation directory, which is the directory where the JBoss EAP or JBoss AS files were extracted to.
On Windows, this is accomplished by going to Start > Settings > Control Panel > System > Advanced > Environment Variables. Under the System Variables section, click New. Set the JBOSS_HOME environment variable to the location of your JBoss EAP or JBoss AS installation directory:
![]() |
To configure the JBOSS_HOME environment variable on Linux:
Add the following line to the ~/.bashrc file. Note: this must be configured while logged in as the user who runs JBoss EAP or JBoss AS:
export JBOSS_HOME=/path/to/jboss/installation/
Run the following command to enable the JBOSS_HOME environment variable:
source ~/.bashrc
If you are running JBoss EAP, configure the JBOSS_HOME environment variable to point to the /path/to/jboss-eap-version/jboss-as/ directory.
During the first build, third-party libraries are obtained from an online repository, so you must be connected to the Internet, and if you are behind a proxy server, you need to define your proxy server address and proxy server port number. To define a proxy server, add the following line to the $JBOSS_HOME/bin/run.conf file:
JAVA_OPTS=-Dhttp.proxyHost=<proxy-hostname> -Dhttp.proxyPort=<proxy-port>
Replace proxy-hostname with the proxy server's hostname, and proxy-port with the correct proxy server port number.
To build and deploy JBoss Portal from the sources, change into the JBOSS_PORTAL_SOURCE_DIRECTORY/build/ directory, where JBOSS_PORTAL_SOURCE_DIRECTORY is the directory where the JBoss Portal source code was downloaded to. Then, Windows users need to run the build.bat deploy command, and Linux users need to run the sh build.sh deploy command.
At the end of the build process, the jboss-portal.sar file is copied into the $JBOSS_HOME/server/default/deploy/ directory:
![]() |
The previous steps install a bare version of JBoss Portal. In previous versions, several additional modules were deployed as well, but this has since been modularized to provide greater flexibility. To deploy additional modules, refer to the Portal's module list for more information. To deploy all modules at once, change into the build directory. If you are running Linux, run the sh build.sh deploy-all command. On Windows, run the build.bat deploy-all command.
To build the clustered version on Linux operating systems:
Change into the JBOSS_PORTAL_SOURCE_DIRECTORY/build/ directory, and run the following command:
sh build.sh main
Change into the JBOSS_PORTAL_SOURCE_DIRECTORY/core/ directory, and run the following command:
sh build.sh deploy-ha
After the sh build.sh deploy-ha command completes, the jboss-portal-ha.sar file is copied into the $JBOSS_HOME/server/all/deploy/ directory.
To build the clustered version on Windows, repeat the previous steps, replacing sh build.sh with build.bat.
A database is required for JBoss Portal to run. JBoss EAP and JBoss AS include an embedded Hypersonic SQL database that JBoss Portal can use; however, this is only recommended for developer use. The following databases are recommended for production use, and have had test suites run against them: MySQL 4 and 5, Microsoft SQL Server, PostgreSQL 8, and Oracle Database 9 and 10. JBoss Portal can use any database that is supported by Hibernate.
To configure a database to use with JBoss Portal:
Create a new database: this guide assumes that the new database is called jbossportal.
Grant access rights for a user to the jbossportal database: JBoss Portal needs to create tables and modify table data. Grant access rights to a desired user to the jbossportal database. Configure the same username and password in the Datasource descriptor.
Deploy an RDBMS JDBC connector: an RDBMS JDBC connector is required for JBoss Portal to communicate with a database. Copy the connector into the $JBOSS_HOME/server/default/lib/ directory. For example, an RDBMS JDBC connector for MySQL can be download from http://www.mysql.com/products/connector/j/. For the correct RDMBS JDBC connector, please refer to the database documentation.
The JBoss Portal binary download that was extracted in Section 2.2.1.1, “Getting the Binary”, contains pre-configured Datasource descriptors for the more popular databases. Datasource descriptors are provided for the MySQL 4 and 5, PostgreSQL, Microsoft SQL Server, and Oracle databases, and can be found in the setup subdirectory where the JBoss Portal binary was extracted to:
![]() |
Copy the Datasource descriptor that matches your database into the $JBOSS_HOME/server/configuration/deploy/ directory, where configuration is either all, default, minimal, or production. For example, if you are using the production configuration, copy the Datasource descriptor into the $JBOSS_HOME/server/production/deploy/ directory. The production configuration only exists on JBoss EAP installations, and not JBoss AS.
After the Datasource descriptor has been copied into the deploy directory, make sure the user-name, password, connection-url, and driver-class, are correct for your chosen database. Datasource descriptor files can be deployed to test before being used in production. The following is an example Datasource descriptor for a PostgreSQL database:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>PortalDS</jndi-name>
<connection-url>jdbc:postgresql:jbossportal</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>portal</user-name>
<password>portalpassword</password>
</local-tx-datasource>
</datasources>
For further details about Datasource descriptors, please refer to the JBoss JDBC Datasource Wiki page.
To start JBoss EAP or JBoss AS and deploy JBoss Portal:
Datasource descriptor: if you have not done so already, change into the setup subdirectory where the JBoss Portal binary was extracted to. Copy the correct Datasource descriptor file (*-ds.xml) you modified in the previous steps into the $JBOSS_HOME/server/configuration/deploy/ directory.
Start the server: change into the $JBOSS_HOME/bin/ directory. On Windows, execute run.bat. On Linux, run the sh run.sh command. To specify a configuration to use, for example, the default configuration, append the -c default option to the run.bat or sh run.sh commands.
Log in to JBoss Portal: using a Web browser, navigate to http://localhost:8080/portal to open the JBoss Portal homepage. Log in using one of the two default accounts: username user, password user, or username admin, password admin:
![]() |
Tables are automatically created the first time JBoss Portal starts. When deployed for the first time, JBoss Portal checks for the existence of the initial tables, which have not been created yet. This causes errors such as the following, which can safely be ignored:
WARN [JDBCExceptionReporter] SQL Error: -22, SQLState: S0002 ERROR [JDBCExceptionReporter] Table not found in statement ... WARN [JDBCExceptionReporter] SQL Error: 1146, SQLState: 42S02 ERROR [JDBCExceptionReporter] Table 'jbossportal.jbp_cms_repositoryentry' doesn't exist WARN [JDBCExceptionReporter] SQL Error: 1146, SQLState: 42S02 ERROR [JDBCExceptionReporter] Table 'jbossportal.jbp_cms_version_refs' doesn't exist
This chapter describes how to customize the default installation. This includes the JBoss EAP or JBoss AS listening port, email and proxy settings, and database dialect settings. For further configuration details, refer to Section 6.3, “JBoss Portal Descriptors” and Chapter 26, Troubleshooting and FAQ.
It is common for web services to run on port 80. By default, JBoss EAP and JBoss AS use port 8080. If you can not use port forwarding, it is recommended to change the port JBoss EAP or JBoss AS listens on. To change the default port, open the $JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml file, and edit the Connector port value for the jboss.web service; however, this configuration only applies to Apache Tomcat:
<Service name="jboss.web">
<Connector port="8088" address="${jboss.bind.address}"
This example changes the default port to port 8088. The JBoss EAP or JBoss AS server must be restarted before the new port settings take affect.
The default SSL port is 8843. To enable HTTPS support, refer to the JBoss AS Guide. For further information, refer to the Apache Tomcat SSL configuration how-to.
Please refer to Section 14.3.1, “Considerations to use WSRP when running Portal on a non-default port or hostname” to update the WSRP service after having changed the port.
Linux operating systems require root user privileges to run a service on a port less than 1024. Starting JBoss EAP or JBoss AS on port 80 as a non-privileged user will not work. Running JBoss EAP or JBoss AS as the root user could lead to security breaches.
By default, the main JBoss Portal page is accessible by navigating to http://localhost:8080/portal/index.html. This can be changed to a different path, for example, http://localhost:8080/index.html. The context path can be changed when using the deployed jboss-portal.sar/, or before building from source. To change the context path when using the JBoss Portal binary package:
Open the $JBOSS_HOME/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF/jboss-web.xml file. If this file does not exist, copy and save the following example:
<?xml version="1.0"?>
<jboss-web>
<security-domain>java:jaas/portal</security-domain>
<context-root>/portal</context-root>
<replication-config>
<replication-trigger>SET</replication-trigger>
</replication-config>
<resource-ref>
<res-ref-name>jdbc/PortalDS</res-ref-name>
<jndi-name>java:PortalDS</jndi-name>
</resource-ref>
</jboss-web>
Edit the <context-root> element with the desired context path:
<context-root>/testing</context-root>
Using this example, the main JBoss Portal page would be reached by navigating to http://localhost:8080/testing.
To change the context path when building from source:
Change into the directory where the JBoss Portal Source Code ZIP file was extracted to, or where the source from SVN was checked out to. Copy the build/etc/local.properties-example file and save it as build/local.properties.
Open the build/local.properties file and edit the portal.web.context-root option with the desired context path:
# Context root for the portal main servlet portal.web.context-root=/testing
Using this example, the main JBoss Portal page would be reached by navigating to http://localhost:8080/testing.
To clean the project, make sure you are connected to the Internet, and change into the build/ directory. Run the ant clean command.
Rebuild and redeploy JBoss Portal. Refer to Section 2.3, “Installing from the Sources” for build instructions.
By default, Apache Tomcat holds on to the root context, /. You may need to remove the $JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war/ directory, or add a jboss-web.xml file, which declares another context-root other than /, under the $JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war/WEB-INF/ directory, for the above changes to take affect. The following is an example jboss-web.xml file, which changes the Apache Tomcat context path to /tomcat-root:
<?xml version="1.0"?> <jboss-web> <context-root>/tomcat-root</context-root> </jboss-web>
This sections describes how to override the Database (DB) dialect settings. Under most circumstances, the auto-detect feature works. If the Hibernate dialect is not working correctly, override the default behavior by following the instructions in this section.
All hibernate.cfg.xml files in all JBoss Portal modules you intend to use need to be modified. The hibernate.cfg.xml files are found in the jboss-portal.sar/module/conf/hibernate/directory/ directory, where module is the module name, and directory is a directory that, depending on the module, may or may not exist.
To modify these files to force the DB dialect, un-comment the following line from each hibernate.cfg.xml file in each JBoss Portal module you intend to use, so that it looks like the following:
<!-- Force the dialect instead of using autodetection --> <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
Note: this example is for a PostgreSQL database. If you use another database, you need to modify org.hibernate.dialect.PostgreSQLDialect to reflect the correct database. For a list of supported dialects, refer to the dialects list on the Hibernate website.
To modify the DB dialect setting for the JBoss Portal CMS component:
Open the jboss-portal.sar/portal-cms.sar/conf/hibernate/cms/hibernate.cfg.xml file.
Un-comment the following line, so that it looks like the following:
<!-- Force the dialect instead of using autodetection --> <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
Note: this example is for a PostgreSQL database. If you use another database, you need to modify org.hibernate.dialect.PostgreSQLDialect to reflect the correct database. For a list of supported dialects, refer to the dialects list on the Hibernate website.
If you have a standard setup and a mail server installed, the email service should work without any extra configuration. Most Linux distributions have a mail server installed by default. The email service, for example, can be used to verify a user's email address when a user subscribes, or for CMS workflow notifications.
The email service is configured using the $JBOSS_HOME/server/default/deploy/jboss-portal.sar/META-INF/jboss-service.xml file. The following is an example of the section which is used to configure the email service:
<mbean code="org.jboss.portal.core.impl.mail.MailModuleImpl" name="portal:service=Module,type=Mail" xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean"> <xmbean/> <depends>jboss:service=Mail</depends> <depends>portal:service=Module,type=IdentityServiceController</depends> <attribute name="QueueCapacity">-1</attribute> <attribute name="Gateway">localhost</attribute> <attribute name="SmtpUser"></attribute> <attribute name="SmtpPassword"></attribute> <attribute name="JavaMailDebugEnabled">false</attribute> <attribute name="SMTPConnectionTimeout">100000</attribute> <attribute name="SMTPTimeout">10000</attribute> <attribute name="JNDIName">java:portal/MailModule</attribute> </mbean>
A different SMTP server (other than localhost) can be configured, along with a SMTP username and an SMTP password. The following is an example configuration that uses the Gmail SMTP server:
<mbean code="org.jboss.portal.core.impl.mail.MailModuleImpl" name="portal:service=Module,type=Mail" xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean"> <xmbean/> <depends>jboss:service=Mail</depends> <depends>portal:service=Module,type=IdentityServiceController</depends> <attribute name="QueueCapacity">-1</attribute> <attribute name="Gateway">smtp.gmail.com</attribute> <attribute name="SmtpUser">username@gmail.com</attribute> <attribute name="SmtpPassword">myPassword</attribute> <attribute name="JavaMailDebugEnabled">false</attribute> <attribute name="SMTPConnectionTimeout">100000</attribute> <attribute name="SMTPTimeout">10000</attribute> <attribute name="JNDIName">java:portal/MailModule</attribute> </mbean>
Using this example, replace username@gmail.com and myPassword with your correct Gmail username and password.
There are a couple of scenarios where you need your proxy to be correctly defined at the JVM™ level so that you can access documents from Internet. It could be to get the thirdparty libraries if you decided to build JBoss Portal from the sources, to access RSS feeds or weather information in the samples portlet we provide or for your own needs.
To configure the proxy settings, you need to know the proxy host and the port to use. Then, add them when starting Java.
Usually setting up JAVA_OPTS environment variable to -Dhttp.proxyHost=YOUR_PROXY_HOST -Dhttp.proxyPort=YOUR_PROXY_PORT is enough.
JBoss Portal uses the JBoss Microkernel for the service infrastructure. The JBoss Microkernel provides injection of services into other services, otherwise known as wiring. Due to the Microkernel being JMX™ based, it is only possible to inject dynamic proxies that talk to the MBeanServer. The overhead at runtime is minimal since the Microkernel implementation is highly optimized; however, when it is used with Java 5, a noticeable bottleneck occurs due to the fact that the implementation of the JMX API classes, javax.management.*, provided by the Java Platform, perform synchronization. This does not occur under JDK™ 1.4, since those classes are implemented by JBoss MX.
JBoss Portal services use a special kind of Model MBean called JBossServiceModelMBean, which allows the un-wrapping of injected dynamic proxies, and replaces them with Plain Old Java Object (POJO) services. This removes the bottleneck when using Java 5, and also provides a performance boost on JDK 1.4. By default this feature is enabled, but it is possible to disable. To do this on Linux operating systems, change into the $JBOSS_HOME/bin/ directory and run the following command:
sh run.sh -Dportal.kernel.no_proxies=false
On Windows, run the following command:
run.bat -Dportal.kernel.no_proxies=false
Before performing any instructions or operations in this chapter, back up your database and the entire JBoss EAP or JBoss AS directory!
The database schema has not changed since JBoss Portal 2.4; however, there are several differences when using a database created by JBoss Portal 2.4, that prevent simply deploying the latest version of JBoss Portal. For example, some portlets are no longer present in JBoss Portal 2.6, and certain existing portlets are now packaged differently. This chapter describes updating a MySQL database created by JBoss Portal 2.4, for use with JBoss Portal 2.6.
Users, roles, and pages created in JBoss Portal 2.4 should be accessible in JBoss Portal 2.6 deployments.
The upgrade procedure can be straightforward:
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.
Update the data in the JBoss Portal database, as described in Section 4.1.2, “Updating the Database”.
Deploy JBoss Portal 2.6.
In JBoss Portal 2.6, portal pages contain additional areas, such as the Login, Admin, and Dashboard links, on the top right-hand corner of portal pages:
![]() |
Since portal pages now contain additional areas, certain themes have changed. If a default theme that exists in JBoss Portal 2.6 is used, 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, refer to the bundled JBoss Portal 2.6 themes as an example.
The following tables contain all references to portlets:
JBP_INSTANCE
JBP_WINDOW
JBP_OBJECT_NODE
All procedures described in the following sections can performed using the JBoss Portal 2.4 Admin portlet. Treat these directions as guidelines when migrating a large JBoss Portal deployment. Database data can be updated manually using the correct tools for your RDBMS. For example, if you are using a MySQL database, you can use the MySQL Query Browser.
During the upgrade process, legacy references have to be cleaned up, to either remove them, or to allow JBoss Portal 2.6 to recreate them correctly. Remove all references (instances and windows) to the portlets listed below, as they are not present in JBoss Portal 2.6. This can be done using the JBoss Portal 2.4 Admin portlet:
HeaderContentPortlet
URLPortlet
TestPortlet
PortletA
PortletB
SecuredTestPortlet
CharsetPortlet
CounterPortlet
CachedCounterPortlet
ExceptionPortlet
PortletSessionPortlet
EncodingPortlet
The following instructions refer to a standard JBoss Portal 2.4 deployment. If core portlets, portlet instances, or portlet windows were renamed, make the appropriate modifications. The following is an example of the MySQL Query Browser:
![]() |
When running JBoss Portal 2.6 with a database created by JBoss Portal 2.4, a non-existing portlet will try to be displayed, resulting in a 404, The requested resource() is not available error.
Names of certain core bundled-portlets have changed. Destroy the following instances and use the Admin portlet to recreate them, or edit the JBP_INSTANCE table as follows:
Change local.samples.JSPPortlet in the PORTLET_REF column to local./portal-jsp-samples.JSPPortlet.
Change local.portal.CMSPortlet in the PORTLET_REF column to local./portal-cms.CMSPortlet.
Change local.portal.CMSAdminPortlet in the PORTLET_REF column to local./portal-cms.CMSAdminPortlet.
Change local.portal.ManagementPortlet in the PORTLET_REF column to local./portal-admin.AdminPortlet.
Some portlets are no longer present in JBoss Portal 2.6, and certain existing portlets are now packaged differently. Remove the following entries in the JBP_INSTANCE table, so that JBoss Portal 2.6 can recreate them:
rows containing NewsPortletInstance2 in the ID column.
rows containing local.portal.NavigationPortlet in the PORTLET_REF column.
rows containing local.samples.HeaderContentPortlet in the PORTLET_REF column.
rows containing local.samples.WeatherPortlet in the PORTLET_REF column.
rows containing local.samples.NewsPortlet in the PORTLET_REF column.
rows containing local.samples.URLPortlet in the PORTLET_REF column.
rows containing local.samples.TestPortlet in the PORTLET_REF column.
rows containing local.samples.PortletA in the PORTLET_REF column.
rows containing local.samples.PortletB in the PORTLET_REF column.
rows containing local.samples.SecuredTestPortlet in the PORTLET_REF column.
rows containing local.samples.CharsetPortlet in the PORTLET_REF column.
rows containing local.samples.CounterPortlet in the PORTLET_REF column.
rows containing local.samples.CachedCounterPortlet in the PORTLET_REF column.
rows containing local.samples.ExceptionPortlet in the PORTLET_REF column.
rows containing local.samples.PortletSessionPortlet in the PORTLET_REF column.
rows containing local.samples.EncodingPortlet in the PORTLET_REF column.
Remove the following entries in the JBP_WINDOW table, so that JBoss Portal 2.6 can recreate them:
rows containing NavigationPortletInstance in the INSTANCE_REF column.
rows containing URLPortletInstance in the INSTANCE_REF column.
rows containing PortletAInstance in the INSTANCE_REF column.
rows containing PortletBInstance in the INSTANCE_REF column.
rows containing EncodingPortletInstance in the INSTANCE_REF column.
rows containing PortletSessionPortletInstance in the INSTANCE_REF column.
rows containing CachedCounterPortletInstance in the INSTANCE_REF column.
rows containing CounterPortletInstance in the INSTANCE_REF column.
rows containing CharsetPortletInstance in the INSTANCE_REF column.
rows containing SecuredTestPortletInstance in the INSTANCE_REF column.
rows containing SecuredTestPortletInstance in the INSTANCE_REF column.
rows containing ExceptionPortletInstance in the INSTANCE_REF column.
rows containing HeaderContentPortletInstance in the INSTANCE_REF column.
rows containing TestPortletInstance in the INSTANCE_REF column.
rows containing MissingPortletInstance in the INSTANCE_REF column.
Remove the following entries in the JBP_OBJECT_NODE table, so that JBoss Portal 2.6 can recreate them:
rows containing NavigationPortletWindow in the NAME column.
rows containing URLPortletWindow in the NAME column.
rows containing PortletAWindow in the NAME column.
rows containing PortletBWindow in the NAME column.
rows containing MissingInstanceWindow in the NAME column.
rows containing EncodingPortletWindow in the NAME column.
rows containing P