4.7. Configuring eXo Chat database

Warning

You are looking at documentation for an older release. Not what you want? See the current release documentation.

  1. eXo Chat uses MongoDB database. You can install it via this link, the recommended version for eXo Platform 5.0 is 3.4.

  2. Configure the database parameters in chat.properties or exo.properties. The files are located in $PLATFORM_TOMCAT_HOME/gatein/conf for Tomcat and $PLATFORM_JBOSS_HOME/standalone/configuration/gatein for Jboss.

    More details in chat configuration section.

    The parameters to set are the following:

    • standaloneChatServer: This parameter accepts a boolean value : true for standalone mode, false for embedded mode.

    • dbServerType: Default value is mongo which is the value that should be used.

    • dbServerHost: The host of MongoDB database.

    • dbServerPort: The port with which you will connect to MongoDB.

    • dbServerHosts: The MongoDB nodes to connect to, as a comma-separated list of <host:port> values. For example "host1:27017,host2:27017,host3:27017".

    • dbName: The name of the MongoDB database for eXo Chat.

    • dbAuthentication: Set to true if authentication is needed to access to MongoDB.

    • dbUser: The username with which you should connect of the previous value is set to true.

    • dbPassword: The password for MongoDB authentication, it should be modified for security reasons.

Warning

The parameters dbServerPort and dbServerHost are deprecated starting from eXo Platform 5.0 version and should be replaced by the parameter dbServerHosts.

Here is an example for the chat configuration file (the database configuration is in the section MongoDB):

##########################
#
# MongoDB
#
dbServerHosts=host1:27017,host2:27017,host3:27017
dbName=chat
dbAuthentication=false
dbUser=admin
dbPassword=pass

##########################
#
# Chat Server
#
standaloneChatServer=false
chatPassPhrase=chat
chatServerBase=http://127.0.0.1:8080
chatServerUrl=/chatServer
chatPortalPage=/portal/intranet/chat
chatCronNotifCleanup=0 0/60 * * * ?
chatReadTotalJson=200

############################
#
# Chat Client updates
#
chatIntervalSession=60000
chatTokenValidity=60000
chatUploadFileSize=100
request.timeout=15000

Note

For a quick setup, the Chat add-on by default connects to MongoDB at localhost:27017 without authentication, so no advanced setup is required if you install MongoDB in the same machine with Platform server.

If you secure MongoDB and allow remote connections, you have to configure the add-on, see Secured MongoDB.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus