72 WebSphere eXtreme Scale Best Practices for Operation and Management
The grid containers initialize the object grids that are defined in the configuration files upon
start-up of the Java EE application that contains the module. This method makes it easier to
manage the WebSphere eXtreme Scale run time without relying on scripts to launch the grid
containers. For embedded environments, if you want the configuration files to be external to
your modules and .ear or .war files, you can use a technique where you refer to the two
configuration files by defining two URLs each with a well-known Java Naming and Directory
Interface (JNDI) name. This way, the files remain outside any compiled unit and can be more
easily edited by operations as the need arises.
5.1.2 Client XML configuration
An WebSphere eXtreme Scale client also has an ObjectGrid descriptor configuration. The
descriptor initially is the same as the descriptor XML that you gave to the containers to which
the client connects. The client run time is passed this descriptor configuration transparently at
the time that it connects and gets the ObjectGrid reference. In certain cases, it might be
necessary to override parts of the object grid configuration on the client. For example, a
loader plug-in might make sense on the server but the Loader class probably does not even
exist on the client. The specifics of evictors might differ on the client from the server. You
might want to turn off certain features, such as the near cache.
Overriding plug-ins
The following plug-ins and attributes can be overridden in the client ObjectGrid descriptor
XML file:
ObjectGrid plug-ins:
– TransactionCallback plug-in
– ObjectGridEventListener plug-in
– Security-related plug-ins
BackingMap plug-ins:
– ObjectTransformer plug-in (for efficient serialization)
– Evictor plug-in
Download material: For an example of WebSphere eXtreme Scale code that allows you
to start a WebSphere Application Server application server as an WebSphere eXtreme
Scale container using your XML files but with those files external to any compiled .ear or
.war file, see the WAS+XS_ExternalXML_Package.zip file in the additional materials that are
available for this book. For information about downloading this material, see Appendix B,
“Additional material” on page 197.
Configuration alternatives: Another alternative for configuring a grid is to invoke the
WebSphere eXtreme Scale application programming interface (API). Then, the actual Java
or Java EE application contains the configuration, and any modification of the configuration
requires you to repackage and redeploy the application. Note, however, that there might be
cases where using the API to configure a grid is desirable, for example when defining a
temporary grid, or if you want to hide the configuration from users, using the WebSphere
eXtreme Scale API can be a better approach.
We do not provide details about how to use the API to configure a grid. You can obtain
more information about how to use the API to configure a grid at this website:
http://publib.boulder.ibm.com/infocenter/wxsinfo/v7r1/topic/com.ibm.websphere.e
xtremescale.prog.doc/cxsprgrm.html