Chapter 5. Grid configuration 77
To configure client properties as a system property in either a stand-alone or WebSphere
Application Server configuration, use:
-Dobjectgrid.client.props=file_name
The value is the name of a file in the file system (fully qualified or relative to the location of
the script); it cannot be a name based on the class path.
To configure client properties as a programmatic override, use the
ClientClusterContext.getClientProperties method. With this method, the data in the object
is populated with the data from the properties files. You cannot configure security
properties with this method.
5.1.5 Externalizing the server XML configuration in WebSphere Application
Server
A common pattern when running WebSphere eXtreme Scale in WebSphere Application
Server is to deploy Java EE applications that include the required configuration files. When
the run time detects the presence of the server XML files in the META-INF directory of a Java
EE module, it launches the WebSphere eXtreme Scale container automatically.
Typically, the Java EE modules are deployed on a cluster, which effectively turns the cluster
members into WebSphere eXtreme Scale containers. The grid that is hosted by those servers
is registered automatically with the default catalog service domain and, therefore, can be
accessed immediately from client applications that are running in the same cell. This method
brings benefit in terms of integration, but changes in the configuration require a rebuild of the
Java EE applications because they contain the XML files.
In this section, we describe an alternative method that allows for a separation of those XML
files and the Java EE application. Although not the default, a number of clients use this
method already and are very satisfied with it.
Overview
Instead of relying on the run time to launch the WebSphere eXtreme Scale container, we use
a simple servlet to launch it. The web module that contains the servlet is deployed as a
standard EAR file on a WebSphere Application Server cluster. Figure 5-2 illustrates the steps
when we started the WebSphere eXtreme Scale container.