![]() |
![]() |
|
|
Configuring Persistence and Recovery
The following sections describe how WebLogic Integration provides persistence and recovery for B2B integration applications:
Understanding Persistence and Recovery
The B2B engine must be configured to run in one of the following modes:
The persistence setting used by the B2B engine is determined by the configuration of the B2B engine startup class. (For instructions on configuring this class, see Configuring B2B Engine Startup.) Thus, as soon as you start WebLogic Integration, as described in Getting Started in Starting, Stopping, and Customizing BEA WebLogic Integration, the B2B engine starts running in either persistent or nonpersistent mode. The setting for persistence cannot be changed as long as the B2B engine is running.
Fortunately, it is not necessary to shut down your entire WebLogic Integration domain in order change the setting for persistence. Only the B2B engine needs to be shut down, and the B2B Console supports shutdown of this single component. (See Starting and Stopping the B2B Engine from the B2B Console in Starting, Stopping, and Customizing BEA WebLogic Integration). The ability to shut down only the B2B engine is advantageous because it allows you to stop only one functional area of WebLogic Integration; even when the B2B engine is shut down, all other WebLogic Integration applications and resources continue running. When you restart the B2B engine from the B2B console, you are prompted to specify a setting for persistence.
The following sections provide the information you need to understand the consequences of starting or restarting in persistent or nonpersistent mode.
Understanding Persistent Mode
In persistent mode, all state records are read from and written to persistent storage and are not cached in memory. In persistent mode, the B2B engine stores the states of the following types of run-time objects in persistent storage:
Like B2B configuration elements, the data required to support persistence is stored in the database repository. The B2B engine creates a state record for each run-time component that it creates during processing. A state record is a row in a database table; the row represents an object state.
The B2B engine caches all persistent state objects in memory, and saves all information necessary to recover these objects in the database. Updates to state objects are mirrored in the database.
Multiple objects can change state as a message is processed by the B2B engine. The B2B engine updates persistent storage for these objects as a group. If a message passes through the B2B engine successfully, then the recorded changes are retained. If message processing fails at any point, the B2B engine can retry some operations. When an operation fails, the B2B engine discards the changes that the operation caused. To maintain and update a set of objects states as a group, the B2B engine uses transactions.
The B2B engine performs special processing for messages. The message size and the large message support configuration determine how to save the message, as follows:
For information about the large message threshold and large message support, see Configuring B2B Integration in Online Help for the WebLogic Integration B2B Console.
Understanding Nonpersistent Mode
In nonpersistent mode, all state records other than those in the repository are maintained in memory and recovery is disabled. In nonpersistent mode, the B2B engine uses only in-memory tables to store the states of run-time objects. The only difference between persistent mode and nonpersistent mode is that in nonpersistent mode the B2B engine does not save states in persistent storage. This means that states cannot be retrieved when the system is shut down. As a result, state information does not survive system restarts.
Notes: We recommend that you use nonpersistent mode only when developing your WebLogic Integration B2B application, not in production.
If you migrate a Java messaging application written with the WebLogic Collaborate C-Enabler API, the migrated application must be run in a separate JVM in nonpersistent mode.
Understanding Recovery
When you restart after the B2B engine has been shut down, the recovery behavior is dependent on:
Note: When a crash occurs, you must resolve the cause of the crash and restart B2B integration to recover and reinstantiate the persistent data in the run-time environment.
You can shut down the B2B engine in either of two ways: by shutting down WebLogic Integration entirely, using the stopWeblogic command, or by shutting down the only B2B engine from the B2B Console. When the B2B engine is successfully shut down using either of these methods, the shutdown is considered normal. For additional information about the shutdown options, see Stopping WebLogic Integration and Starting and Stopping the B2B Engine from the B2B Console in Starting, Stopping, and Customizing BEA WebLogic Integration.
In a normal shutdown, the state tables are emptied.
When the B2B engine is restarted after a shutdown, its behavior depends on whether it is restarted in persistent mode or nonpersistent mode:
Configuring B2B Engine Startup
The configuration of the B2B engine startup class determines the persistence setting the B2B engine uses when you start WebLogic Integration. The following procedure describes how to view or modify the B2B engine startup configuration from the WebLogic Server Administration Console.
To view or modify the startup configuration:
The WLCStartUp configuration is displayed. One of the following is displayed in the Arguments text box:
For example, in the configuration shown in the following figure, the B2B engine is configured to start in nonpersistent mode.
Figure 8-1 Startup Configuration
You can also update the startup class by editing the config.xml file. If you use this method, you must shut down WebLogic Integration before you edit the file. Any changes made to the file while WebLogic Integration is running will be lost.
To modify the startup class in the config.xml file:
<StartupClass
ClassName="com.bea.b2b.server.Startup"
Name="WLCStartup"
Arguments="PERSISTENCE=OFF"
Targets="myserver"/>
Configuring Persistence and Recovery
The following table summarizes how to set the persistence mode when you start the B2B engine. For details about the start procedures referenced in the table, see Starting WebLogic Integration and Starting and Stopping the B2B Engine from the B2B Console in Starting, Stopping, and Customizing BEA WebLogic Integration.
Table 8-1 Setting the Persistence Mode
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|