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

	"@(#)README 3.3 99/03/23 SMI"

	Copyright (c) 03/23/99, by Sun Microsystems, Inc.
	All rights reserved.

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

		Self-Registering M-Bean Example
		===============================


-----------------------------------------------------------------------
1. Example overview
-----------------------------------------------------------------------
This example shows how to perform initialization tasks and register an 
m-bean using the initCmf method and how to perform closedown tasks,
serialize and deregister the m-bean using the deleteCmf method.

The current directory contains the following source files:
   * SelfRegClient.java:
	- Implements a simple manager.	
	- Sets up communication using the RMI adaptor client
	  to connect to the agent.
	- Gets a handle on the m-bean from the remote agent.
	- Gets and sets m-bean properties through a c-bean
          by using a handle on the m-bean.

   * SelfRegBean.java:
	- Implements a simple m-bean.
	- Uses the m-bean specific method initCmf to register an m-bean 
	  with the framework. This method makes it possible
	  for an m-bean to adapt itself and its environment.
	- Uses the m-bean specific method deleteCmf to serialize the 
	  m-bean before it is deleted.
	- Contains a read-write m-bean property and a read-only m-bean 
	  property.
	- Implements an action method.


-----------------------------------------------------------------------
2. Building and running the example
-----------------------------------------------------------------------
To build the self registration example, copy the example source files 
to your working directory and type the following commands:

   cd <WORKING_DIR>

   javac -d . SelfRegBean.java

   mogen SelfRegBean

   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 Java DMK base agent:

   jaw start

   # Start the manager:

   java SelfRegClient

