4.3. Datasource JNDI name

Warning

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

As said previously, eXo Platform uses two datasources, exo-idm_portal and exo-jcr_portal. If for any reason you change those names in datasource configuration (xml file), you need to match them in some other files.

Note

The properties file (exo.properties) will not take "_portal" suffix as it is appended automatically by eXo, as detailed below.

There is a constraint that the suffix of datasource JNDI names must be "_portal". Take JCR as example, it uses the following property:

exo.jcr.datasource.name=java:/comp/env/exo-jcr

to look up a datasource for the portal. Because the core of eXo Platform is designed for supporting multi-portal, there are theoretically different datasources for different portals. Consequently this property is treated as datasource name's prefix, and the portal name (knowing that it is "portal" by default) is appended to complete the name in JNDI lookup.

So if you change the JDNI names exo-idm_portal and exo-jcr_portal, you need to edit the following properties:

# JNDI Name of the IDM datasource
exo.idm.datasource.name=java:/comp/env/exo-idm
...
# name of the datasource that will be used by eXo JCR
exo.jcr.datasource.name=java:/comp/env/exo-jcr

in gatein/conf/exo.properties (Tomcat), or standalone/configuration/gatein/exo.properties (JBoss).

If you have not created exo.properties yet, see Configuration overview.

Particularly in Tomcat, you also need to edit conf/Catalina/localhost/context.xml.default file:


<ResourceLink name="exo-jcr_portal" global="exo-jcr_portal" type="javax.sql.DataSource"/>
<ResourceLink name="exo-idm_portal" global="exo-idm_portal" type="javax.sql.DataSource"/>
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus