Chapter 3. Configuration

eXo Configuration
Portal Containers, Customization and Configurations
configuration.properties
configuration.xml
portal/portal/configuration.xml
Database Configuration
FileSystem pathes
Mail Server
WebDAV Cache Control
Chat Server
XMPPMessenger
Chat server configuration
Logging
JCR

In eXo platform, the configuration lives in a folder whose location is controlled by a system property named exo.conf.dir. By default, the gatein.sh startup script sets this property as follows :

So the main entry point for the eXo Platform's configuration is /gatein/conf/. This directory contains the following files :

Let's stop and explain some parts of the eXo internals in order to understand the roles of these configuration files.

eXo Platform kernel groups runtime components in portal containers. A portal container holds all components to run a portal instance. It serves portal pages under the servlet context for his name.

The default portal container in eXo Platform is called simply "portal". This is why the default url for the samples is http://localhost:800/*portal*.

The default portal container can be configured directly inside exo.conf.dir.

But eXo Platform is capable of running several portal instances simultaneously on the same server. Each instance can be configured and customized independently via files located at : /gatein/conf/portal/$PORTAL_NAME, where $PORTAL_NAME is the name of the portal container.

Note

The exact name of the configuration file can be altered. Please refer to the section dedicated to PortalContainerDefinition in the Kernel reference for more details on portal containers and other options to modify the location of the properties.

Services that run inside a portal container are declared via xml configuration files like configuration.xml. Such files exists in jars, wars and below exo.conf.dir.

XML configuration files also serve as the main way to customize the portal via the multiple plugins offered by eXo components.

Additionally, xml files may contain variables that are populated via properties defined in configuration.properties. Hence, the configuration.properties serves as exposing some chosen variables that are necessary to configure eXo Platform in a server environment.

eXo Platform relies on the application server for its database access, so the database must be configured as a datasource at the AS level. That datasource is obtained by accessing the enterprise naming context (ENC) through the Java Naming and Directory Interface (JNDI) service.

By default, eXo Platform defines two datasources:

The tomcat bundle comes with the two datasources preconfigured as GlobalNamingContext Resources. Please refer to Tomcat's JNDI Resources How To for more details on JNDI resources binding in Tomcat.

The configuration lives in 3 files that you will want to edit in order to change the database.

eXo Platform requires an SMTP server in order to send emails such as notificaitons or password reminders.

gatein.email.smtp.host SMTP hostname
gatein.email.smtp.port SMTP port
gatein.email.smtp.starttls.enable true to enable secure (TLS) SMTP. See RFC 3207
gatein.email.smtp.auth true to enable SMTP authentication
gatein.email.smtp.username username to send for authentication
gatein.email.smtp.password password to send for authentication
gatein.email.smtp.socketFactory.port Specifies the port to connect to when using the specified socket factory
gatein.email.smtp.socketFactory.class his class will be used to create SMTP sockets.

More details con be found in the JavaMail API documentation.

The standalone Chat server is configured in the file $CHATSERVER/conf/openfire.xml.

Configuration is based on properties expressed in an XML syntax. For example, to set property prop.name.is.blah=value, you would write this xml snippet :

Openfire has an extensive list of configuration properties. Please read the list of all properties in Openfire documentation

The chat server is an openfire server bundled with plugins and configurations that allow connectivity to eXo Platform. The following properties are used to configure it.

Property Description Default value
env   
serverbaseURL base url for all URLs below http://localhost:8080/
restContextName name of the rest context rest
provider   
authorizedUser.name username to authenticate against the HTTP REST service root
authorizedUser.password password matching with provider.authorizeduser.name password
eXoAuthProvider   
authenticationURL URL to authenticate users /organization/authenticate/
authenticationMethod HTTP method used to pass parameters POST
eXoUserProvider   
findUsersURL URL to find all users /organization/xml/user/find-all/
findUsersMethod HTTP method for user/find-all GET
getUsersURL URL to retrieve a range of users /organization/xml/user/view-range/
getUsersMethod HTTP method for user/view-range GET
usersCountURL URL to count users /organization/xml/user/count/
usersCountMethod HTTP method for user/count GET
userInfoURL URL to get user info /organization/xml/user/info/
userInfoMethod HTTP method for user/info GET
eXoGroupProvider   
groupInfoURL URL to get group info /organization/xml/group/info/
groupInfoMethod HTTP method for info GET
getGroupsAllURL URL to view all groups /organization/xml/group/view-all/
getGroupsAllMethod HTTP method for group/view-all GET
getGroupsRangeURL URL to view a group range /organization/xml/group/view-from-to/
getGroupsRangeMethod HTTP method for group/view-from-to GET
getGroupsForUserURL URL to get groups for a user /organization/xml/group/groups-for-user/
getGroupsForUserMethod HTTP method for groups-for-user GET
groupsCountURL URL to count groups organization/xml/group/count
groupsCountMethod HTTP method for group/count GET

In order to run properly the chat server needs several ports to be opened in the firewall.

Port Type Description
5222 (1) client to server (xmpp) The standard port for clients is to connect to the server. Connections may or may not be encrypted. You can update the security settings for this port with exo.chat.port property.
9090 && 9091 Admin Console (http) The port used for respectively the unsecured and secured Openfire Admin Console access.
3478 & 3479 STUN service The port used for the service that ensures connectivity between entities when behind a NAT.

Logging in eXo Platform is controlled by the Java Logging API.

By default, logging is configured to:

  • log errors and warnings on the console

  • log info level statements in /gatein/logs/gatein-YYYY-MM-DD.log

In Tomcat, the logging is configured via the conf/logging.properties file. Please refer to Tomcat's Logging Documentation for more information on how to adjust this file to your needs.