-----------------------------------------------------------------------

	"@(#)README 3.1 98/09/29 SMI"

	Copyright (c) 09/29/98, by Sun Microsystems, Inc.
	All rights reserved.

-----------------------------------------------------------------------

			Recover Example
			===============


-----------------------------------------------------------------------
1. Example overview
-----------------------------------------------------------------------

This example shows how an agent can recover to its previous state 
using persistence and a service that provides activation. The mechanism
makes use of the ActivatableIf interface which is implemented by all
Java Dynamic Management Kit services that have a state.

The current directory contains the following source files:
   * Agent.java:
 	- Implements a basic agent application.
	- Creates a security manager to allow classes 
	  containing native code to be loaded.
	- Initializes the framework with a repository offering recovery.
	- Adds the HTTP, HTML and RMI adaptors to the framework persistent.
        - Adds the MetaData, Launcher and Discovery services to the
          framework persistent.
          
   * RecoveryRepSrv.java:
        - Simple implementation of an object repository.
        - Offers persistency through flat files.
        - Provides a recovery mechanism through a Restart service.
        
   * RestartSrv.java:
        - Provides a basic service for reactivating objects after an agent
          has stopped.

   * RestartList.java:
        - A container that holds object names regitered with the 
          Restart service.

   * ActivationFailure.java:
        - A structure that holds the information describing an 
          activation failure.


-----------------------------------------------------------------------
2. Running the precompiled version
-----------------------------------------------------------------------
To run the precompiled version of the example, type the following
commands:

   setenv CLASSPATH /opt/SUNWconn/jaw/examples/classes:/opt/SUNWconn/jaw/classes/jawco.jar:/opt/SUNWconn/jaw/classes/jawag.jar:/opt/SUNWconn/jaw/classes/jawcl.jar:/opt/SUNWconn/jaw/classes/jawcs.jar:/opt/SUNWconn/jaw/classes/jawtk.jar

   # Make sure that no agents are already running 
   # and start the agent:

   java examples.recover.Agent


-----------------------------------------------------------------------
3. Building and running your own version
-----------------------------------------------------------------------
To build your own version of the example, copy the example source files
to your working directory and type the following commands:

   cd <WORKING_DIR>

   setenv CLASSPATH .:/opt/SUNWconn/jaw/examples/classes:/opt/SUNWconn/jaw/classes/jawco.jar:/opt/SUNWconn/jaw/classes/jawag.jar:/opt/SUNWconn/jaw/classes/jawcl.jar:/opt/SUNWconn/jaw/classes/jawcs.jar:/opt/SUNWconn/jaw/classes/jawtk.jar:<JDBC_CLASSES>

   javac -d . *.java


To run the version of the example you have just built, type the
following commands:

   # Make sure that no agents are already running 
   # and start the agent:

   java examples.recover.Agent
