GateIn Portal can be configured to work with domain mode but under some limitations that we are going to describe:
GateIn configuration
GateIn Portal configuration is located into several files.
Some configuration elements (i.e. required datasources) are defined inside the AS7 server instance configuration file but others portal specific are defined in separate files.
These files are grouped in a folder, by default, in the standalone configuration, this folder is located at $JBOSS_HOME/standalone/configuration/gatein/ .
Working in Domain mode requires to define where GateIn configuration will be placed for each server instance.
GateIn Portal defines several variables as system properties level that can help to define the path of the external configuration files.
These variables are:
-
exo.conf.dir
-
gatein.conf.dir
-
gatein.portlet.config
We can adopt several strategies to indicate where GateIn Portal configuration will be located in Domain mode:
(a) Configuration defined per server instance:
This strategy defines configuration variables per server instance.
This can be done inside the host.xml file used, for example:
<server name="server-one" group="main-server-group">
<system-properties>
<property name="exo.conf.dir" value="${jboss.home.dir}/standalone/configuration/gatein"/>
<property name="gatein.conf.dir" value="${jboss.home.dir}/standalone/configuration/gatein"/>
<property name="gatein.portlet.config" value="${jboss.home.dir}/standalone/configuration/gatein"/>
</system-properties>
</server>
Note that
${jboss.home.dir}/domain/servers/myinstance/configuration/gatein
has to be created, domain mode will not create this folder for you.
If we create manually a server instance using AS7 console or CLI tool we should add these properties manually to allow GateIn Portal loads succesfully, for example:
When gatein.conf.dir variable is set up via system properties it must be commented from GateIn Portal configuration.properties file
(b) Configuration shared per a group of servers:
Using this strategy we need to predefine a folder that will host the GateIn configuration per all server instances.
Next step will be define configuration variables at server-group level inside a domain.xml file.
For example:
<server-group name="main-server-group" profile="full">
<jvm name="default">
<heap size="1303m" max-size="1303m"/>
<permgen max-size="256m"/>
</jvm>
<socket-binding-group ref="full-sockets"/>
<system-properties>
<property name="exo.conf.dir" value="${jboss.home.dir}/standalone/configuration/gatein"/>
<property name="gatein.conf.dir" value="${jboss.home.dir}/standalone/configuration/gatein"/>
<property name="gatein.portlet.config" value="${jboss.home.dir}/standalone/configuration/gatein"/>
</system-properties>
</server-group>
We can also use AS7 or CLI tool to create a server group with variables defined as system properties, for example:
When gatein.conf.dir variable is set up via system properties it must be commented from GateIn Portal configuration.properties file
Portal Extensions and Portal Containers
Portal Extensions and Portal Containers mechanisms are functionalities that make it possible to overrride portal services and resources allowing a powerful way to personalize GateIn Portal.
These specific elements are packged as .war or .ear archives but they are deployed into a special folder located at
${jboss.home.dir}/gatein/extensions
Portal Extensions and Portal Containers are not hot-deployable. There is a special GateIn service in charge to load these element at startup from extensions folder.
Portal Extensions and Portal Containers cannot be deployed via domain mode mechanism, they need to be deployed manually at file system layer.
Portal applications can be deployed using domain mode mechanism as well as other JEE application.
There are also two additional variables that can be used to personalize per a server instance or server group where to find the main portal container (gatein.ear) or their extensions:
-
gatein.deploy.dir, with default value $JBOSS_HOME/gatein
-
gatein.extensions.dir, with default value $JBOSS_HOME/gatein