Configurations supporting multiple entries are called factory configurations.
If a service is meant to support factory configurations, its System Settings
entry has an ADD button.
Figure 1: If a System Settings entry has an ADD button, it's suitable for factory configurations.
As with single-instance configurations, you can set factory configurations in
the System Settings interface (as described in the example above) or via
configuration files. Name a standard single-instance configuration file like
If your service supports factory configurations, use the convention of calling
the configuration’s first instance -default.config:
The next instance contains a unique subname (something other than default).
It’s good practice to use a descriptive name:
To follow the CXF Endpoints example described above, if Liferay’s developers had
shipped an initial CXF Endpoint .config file with Liferay DXP, it would have
been named this:
If this -default.config configuration specifies a context path for REST web
services, and you create another endpoint with a different context path for
SOAP web services, your second configuration file could be named:
In many cases, configuration files can be used to force a factory configuration
scenario, but not all configurations can be used this way. It’s best to stick to
the intended use cases. Use System Settings as described above to determine if
using factory configurations is a good idea. If not, stick to the single
occurrence mode of configuration (specifying only one configuration file for the