[Fix Pack 9 or later]


Enabling dynamic cache service multi-cell and multi-core group invalidation with scripting

You can use the dynacacheJMSSIB.py script to enable dynamic cache service multi-cell and multi-core group invalidation. This script configures the external cache adapter and service integration bus infrastructure in multiple cells. The script must be executed from the WAS_INSTALL_ROOT/profiles/PROFILE_NAME/bin directory for it to work correctly.

Before you begin

Before starting this task, the wsadmin tool must be running. See the topic on how to start the wsadmin tool for more information.

You must also ensure that :
  • Each cell or core group contains a cluster that is hosting a production application. The same production application has to be used in both cells or core groups to ensure invalidation IDs are processed correctly.
  • A separate cluster of two servers is created in each cell or core group to host the service integration bus. The members of this cluster cannot have a RemoteJMSInvalidator external cache group defined. If a RemoteJMSInvalidator external cache group is defined for these cluster members, an infinite loopback condition occurs where invalidations are repeatedly send back and forth between cells.
  • A datasource is defined and is accessible from both service integration bus cluster members. If the database is shared by both cells, ensure a unique database name is used when defining each the datasource for each cell.
  • Each cell or core group contains a replication domain that contains both the service integration bus cluster and all of the clusters hosting the production applications.

About this task

The dynacacheJMSSIB.py script configures each cell or core group in three steps:
  1. Inbound JMS/service integration bus configuration.
    Inbound JMS/service integration bus configuration includes:
    • Creating a service integration bus and configuring the service integration bus destination.
    • Creating a Java Message Service (JMS).
    • Configuring the JMS activation specification
    • Installing the WAS_INSTALL_ROOT/installables/DynacacheMessageHandler.ear message driven bean on the service integration bus cluster.
  2. Outbound JMS/service integration bus configuration.

    Outbound JMS/service integration bus configuration includes configuring the JMS queue connection factory to communicate with a remote cell.

  3. External cache group configuration.

    External cache group configuration includes configuring an external cache group and external cache adapter on each cluster member hosting the production applications.

Using jython, specify --help and the appropriate --setup=xxx option to display the available parameters for each command:
./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
--setup=dynacacheInSIB --help
./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
--setup=dynacacheOutSIB --help
./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
--setup=ddynacacheECA --help

To delete an inbound, outbound, or ECA configuration, add --delete to the command used to create the respective configuration artifacts.

Example

Example 1: Multiple cells

This example shows how the script is used to configure two cells, Cell1 and Cell2, where both cells host the same application,ApplicationA.
Cell1
ProductionCluster1 (hosts ApplicationA)
	SIBCluster1
		node1/sib1 (service integration bus member)
			SIB_ENDPOINT_ADDRESS=7777
			hostname=host1.com
		node1b/sib2 (service integration bus member)
			SIB_ENDPOINT_ADDRESS=7776
			hostname=host11.com			
		ReplicationDomain (contains ProductionCluster1 members and SIBCluster1 
		members)
	Service Integration Bus Data Source1
		JNDI name = jdbc/SIBCluster1DataSource
Cell2
ProductionCluster2 (hosts ApplicationA)
	SIBCluster2
		node2/sib1 (service integration bus member)
			SIB_ENDPOINT_ADDRESS=8888
			hostname=host2.com
		nodesb/sib2 (service integration bus member)
			SIB_ENDPOINT_ADDRESS=8889
			hostname=host22.com			
		ReplicationDomain (contains ProductionCluster2 members and SIBCluster2 
		members)
	Service Integration Bus Data Source2
		JNDI name = jdbc/SIBCluster2DataSource	

Complete the following steps to enable dynamic cache service cell invalidation support for Cell1 and Cell2.

  1. Issue the following command to configure inbound JMS/service integration bus for Cell1:
    ./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
    --setup=dynacacheInSIB --cluster=SIBCluster1
    --datasourceJNDI=jdbc/SIBCluster1DataSource
  2. Issue the following command to configure inbound JMS/service integration bus for Cell2:
    ./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
    --setup=dynacacheInSIB --cluster=SIBCluster2
    --datasourceJNDI=jdbc/SIBCluster2DataSource
  3. Issue the following command to configure outbound JMS/service integration bus for Cell1:
    ./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
    --setup=dynacacheOutSIB --remoteCellSIBServers=host2.com:8888,host22.com:8889 
    --remoteCellID=Cell2
  4. Issue the following command to configure outbound JMS/service integration bus for Cell2:
    ./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
    --setup=dynacacheOutSIB --remoteCellSIBServers=host1.com:7777,host11.com:7776 
    --remoteCellID=Cell1
  5. Issue the following command to configure external cache group/adapters for Cell1:
    ./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
    --setup=dynacacheECA --cluster=ProductionCluster1 
    --remoteCellID=Cell2 
  6. Issue the following command to configure external cache group/adapters for Cell2:
    ./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
    --setup=dynacacheECA --cluster=ProductionCluster2 
    --remoteCellID=Cell1

Example 2: Single cell that contains multiple core groups

This example shows how the script is used to configure a single cell that contains multiple core groups. The core groups host the same application (ApplicationA).
CoreGroup1
	ProductionCluster1 (hosts ApplicationA)
	SIBCluster1
		node1/sib1 (service integration bus member)
			SIB_ENDPOINT_ADDRESS=7777
			hostname=host1.com
		node1b/sib2 (service integration bus member)
			SIB_ENDPOINT_ADDRESS=7776
			hostname=host11.com			
		ReplicationDomain (contains ProductionCluster1 members and SIBCluster1 
		members)
	Service Integration Bus Data Source1
		JNDI name = jdbc/SIBCluster1DataSource
CoreGroup2 in Cell2 is also hosting ApplicationA and has the following topology:
CoreGroup2
	ProductionCluster2 (hosts ApplicationA)
	SIBCluster2
		node2/sib1 (service integration bus member)
			SIB_ENDPOINT_ADDRESS=8888
			hostname=host2.com
		nodesb/sib2 (service integration bus member)
			SIB_ENDPOINT_ADDRESS=8889
			hostname=host22.com			
		ReplicationDomain (contains ProductionCluster2 members and SIBCluster2 
		members)
	Service Integration Bus Data Source2
		JNDI name = jdbc/SIBCluster2DataSource	

Complete the following steps to enable dynamic cache service core group invalidation support for CoreGroup1 and CoreGroup2.

  1. Issue the following command to configure inbound JMS/service integration bus for CoreGroup1:
    ./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
    --setup=dynacacheInSIB --localCellID=Cell1/CoreGroup1 --cluster=SIBCluster1 
    --datasourceJNDI=jdbc/SIBCluster1DataSource
  2. Issue the following command to configure inbound JMS/service integration bus for CoreGroup2:
    ./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
    --setup=dynacacheInSIB --localCellID=Cell1/CoreGroup2 --cluster=SIBCluster2 
    --datasourceJNDI=jdbc/SIBCluster2DataSource
  3. Issue the following command to configure outbound JMS/service integration bus for CoreGroup1:
    ./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
    --setup=dynacacheOutSIB --localCellID=Cell1/CoreGroup1 
    --remoteCellSIBServers=host2.com:8888,host22.com:8889 
    --remoteCellID=Cell1/CoreGroup2
  4. Issue the following command to configure outbound JMS/service integration bus for Coregroup2:
    ./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
    --setup=dynacacheOutSIB --localCellID=Cell1/CoreGroup2 
    --remoteCellSIBServers=host1.com:7777,host11.com:7776 
    --remoteCellID=Cell1/CoreGroup1
  5. Configure external cache group/adapters for CoreGroup1:
    ./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
    --setup=dynacacheECA --cluster=ProductionCluster1 --localCellID=Cell1/CoreGroup1
    --remoteCellID=Cell1/CoreGroup2 
  6. Issue the following command to configure external cache group/adapters for CoreGroup2:
    ./wsadmin.sh -lang jython -f ../../../util/dynacacheJMSSIB.py 
    --setup=dynacacheECA --cluster=ProductionCluster2 --localCellID=Cell1/CoreGroup2
    --remoteCellID=Cell1/CoreGroup1



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Oct 21, 2010 10:04:34 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-mp&topic=txml_multicell_caching
File name: txml_multicell_caching.html