Use this sample to create a basic global cache configuration,
in which a single integration server hosts both a catalog server and
a container server.
About this task
You can copy and paste the content of the global cache section of configuration files to replace
the existing content of the GlobalCache section of your
server.conf.yaml files and then modify them as required. The
GlobalCache section is a sub-section of the
ResourceManagers section in the server.conf.yaml
files.
This sample shows how to
configure the global cache for a basic scenario, using a single integration
server that is hosting both a catalog server and a container server,
as shown in the following diagram:
For information about other samples, which show how to
configure global cache for different scenarios, see the following
topics:
Procedure
Complete the following steps to create a basic global
cache configuration, in which a single integration server hosts both
a catalog server and a container server:
- Create an integration server called
integrationServer1
.
- Open the configuration file for your integration server
(integrationServer1\server.conf.yaml) by using a YAML editor.
You can edit the file by using the built-in YAML editor that is provided in the IBM App Connect
Enterprise Toolkit, either by double-clicking the file in the Application
Development view or by right-clicking the file and selecting . If you choose to edit the file by
using a plain text editor, ensure that you do not include any tab characters (which are not valid in
YAML) and use a YAML validation tool to validate the contents of your file.
- Copy and paste the content of the GlobalCache section in the
supplied server.conf.yaml sample file (in the
install_directory\server\samples\globalcache\basic_1_catalog_1_container
folder) to replace the existing content of the GlobalCache section of your
server.conf.yaml file.
The GlobalCache section is a sub-section of the
ResourceManagers section in the server.conf.yaml
file.
# Integration server configuration file for use as global cache container
# Provides a "basic" configuration with a single integration server acting as both a catalog server and a container server
#
# General notes:
# - Integration server will load server.conf.yaml from directory set via --work-dir
# - To ensure valid YAML avoid any use of TAB characters
# - File paths may be taken as absolute, or relative to the integration server's work directory
#
GlobalCache:
cacheOn: true # Set to true to enable Global Cache functionality
# When using Global Cache it is advisable to change your jvmMinHeapSize and jvmMaxHeapSize depending on
# the number of live objects in the heap, complexity of live objects in the heap and number of available cores.
# see https://www.ibm.com/support/knowledgecenter/SSTVLU_8.6.0/com.ibm.websphere.extremescale.doc/cxsjvmtune.html
cacheServerName: 'MyCatalogServer1' # The name of this cache server component (a cache server component can be a catalog and/or a container); it must be unique in your global cache system
catalogServiceEndPoints: 'localhost:2800' # Comma-separated list of hostnames and ports for the catalog servers to use, e.g. 'localhost:2800'
catalogDomainName: 'WMB_MyCacheDomain' # Name of the shared global cache domain; this value should be shared by all catalog servers in the same domain
catalogClusterEndPoints: 'MyCatalogServer1:localhost:2803:2801'
# Comma-separated list of catalog server connection details in the format 'cacheServerName:catalogCacheServerHost:HAPort:clientPort'
# If this is a catalog server, cacheServerName should match the value above, and if not, it will be the value used on the integration server hosting it
# The list should be in the same order for all catalog and container servers which are interacting together in the same domain
enableCatalogService: true # Set to true to launch a catalog service cache server component in this integration server
enableContainerService: true # Set to true to launch a container service cache server component in this integration server
enableJMX: true # Allow admin access to this container service via JMX
listenerHost: 'localhost' # Comma-separated list of hostnames for this cacheServer component, e.g. 'localhost,myserver.mycompany.com'
listenerPort: 2800 # Port number this cache server listens on; it must be unique on this machine
# Four consecutive ports are assigned, e.g. 2800 for catalogCacheServerListenerPort, 2801 for clientPort, 2802 for JMXServicePort, 2803 for HAPort
#deploymentPolicyCustomFile: '' # Override the deployment policy file (default is <install directory>/server/cachesupport/config/deployment.xml)
#objectGridCustomFile: '' # Override the ObjectGrid file (default is <install directory>/server/cachesupport/config/objectgrid_xio.xml)
#overrideTraceSpec: '' # Set a trace level for the cache server components, e.g. ObjectGrid*=event=enabled
#clientsDefaultToSSL: false # Set to true to enable SSL for any client connections to the cache servers
#sslAlias: '' # SSL Alias to use for the cache server component
#sslProtocol: '' # SSL Protocol to use for SSL connections eg. default is "TLSv1.2"
- Restart the integration server for the changes to take
effect.
When it is restarted, integrationServer1
will
be both a catalog server and a container server.
What to do next
If you have only one catalog server and you stop it, the
cache becomes unavailable and your data is lost. However, if you have
multiple catalog servers, one of them can be stopped and restarted
without losing data; your data is lost only if all catalog servers
are stopped.