![]() |
![]() |
|
|
Configuring Persistence and Recovery
The following sections describe c-hub persistence and recovery:
Persistence
If the recovery mode argument for the c-hub start-up class is set to ON for the c-hub, the c-hub saves the state of a c-hub component to persistent storage when it detects a state change for the component. The types of components for which the c-hub saves the component state are:
When the c-hub detects a state change for a message, the c-hub also saves the message or the message location. If large message support is enabled and the message is a large message, the c-hub saves the message location to persistent storage. Otherwise, the c-hub saves the message to persistent storage.
Persistent storage consists of a database that the c-hub accesses by means of a connection pool. Persistent storage and the repository share the same database. The c-hub creates a state record for each component that it saves to persistent storage. A state record is a row in a database table and represents an object state.
Multiple components can change state during the time that a message passes through the c-hub. The c-hub must update the persistent storage for these components as a group. If a message passes through the c-hub successfully, then the recorded changes are retained. If the message fails, then the c-hub discards the changes. To maintain and update component states as a group, the c-hub uses transactions.
The c-hub uses the database as persistent storage, which means that:
The c-hub persistence strategy is:
Note: When a crash occurs, you must resolve the cause of the crash and reboot the WebLogic Collaborate process to recover the persistent data.
State Records
A state record is a row in a database table. The row contains a copy of the component state. You can use the C-Hub Administration Console to view the state of each component. For information about using the C-Hub Administration Console to monitor components, see Monitoring the C-Hub. The following table describes the state records.
Recovery
When you restart a c-hub, it examines persistent storage for state records. The c-hub uses the presence or absence of state records to determine the last known state of the c-hub before termination. The type of termination was one of the following:
The goal of recovery is to reconstruct the last known stable run-time image of a c-hub after a crash so that message processing can continue. During startup, if the Hub State indicates that the c-hub crashed, then the start-up process shifts to recovery mode.
The recovery process does not rely solely on the repository data to initiate the c-hub. Instead, the recovery process reads information from persistent storage for the previous c-hub instance. The state records and the message content or location from persistent storage supersede the repository data. After copying the state records and the message content or location and re-creating the corresponding components, the recovery process reads the repository to configure the rest of the c-hub.
If a c-enabler tries to communicate with the c-hub during recovery, the c-hub sends a message to the c-enabler to wait for the conclusion of the recovery process.
Procedure for Configuring Persistence and Recovery
To configure persistence and recovery:
Attribute Value Name WLCStartup Class Name com.bea.b2b.hub.Startup Arguments RecoveryMode=ON|OFF Abort Startup on Failure TRUE
The recovery mode is either ON or OFF. To create and maintain persistent storage, the recovery mode must be ON. The default is OFF.
<JMSJDBCStore
Name="JMSWLCStore"
ConnectionPool="wlcPool"
/>
For complete information, see Configuring the Java Message Service Queue in Setting Up the C-Hub.
Listing 5-1 Set the JMSJDBCStore and JMSServer to use the same pool as the repository.
<StartupClass
ClassName="com.bea.b2b.hub.Startup"
Name="WLCStartup"
Arguments="RecoveryMode=ON"
Targets="myserver"
/>
<JDBCTxDataSource
JNDIName="WLCHub.DS"
Name="WLCHub.DS"
PoolName="repositoryPool"
EnableTwoPhaseCommit="true"
Targets="myserver"
/>
<JMSJDBCStore
ConnectionPool="repositoryPool"
PrefixName="hoa"
Name="JMSWLCStore"
/>
<JMSServer
Name="WLCJMSServer"
Targets="myserver"
Store="JMSWLCStore"
/>
For more information about configuring the c-hub, see Setting Up the C-Hub.
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|