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

	"@(#)README 3.2 98/09/30 SMI"

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

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

			JDBC Example
			============


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

This example shows how a persistent repository can be implemented
on top of a database. The repository uses the JDBC API to access
the database.

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 implementing JDBC.
        - Checks if there are m-beans present at startup time and activate
          them if they implement the ActivatableIf.
	- Adds the HTTP, HTML and RMI adaptors to the framework persistent.
        - Adds the MetaData, Launcher and Discovery services to the
          framework persistent.
          
   * JDBCRepositorySrv.java:
        - Simple implementation of an object repository.
        - Offers persistency through JDBC.
        
   * RegistryTable.java:
        - Provides a basic service for managing a registry table in a database.

   * DomainTable.java:
        - Provides a basic service for managing a domain table in a database.

   * Table.java:
        - Provides a basic service for managing database tables.

   * SerializationConvertion.java:
        - Serialize and deserialize objects from and to byte arrays.
        
   * SerializationInputStream.java:
        - Subclass of ObjectInputStream implementing the resolveObject method.

   * SerializationOutputStream.java:
        - Subclass of ObjectOutputStream implementing the replaceObject method.
        
   * SerializationMarker.java:
        - Used to mark the position of the framework in a serialization stream.


-----------------------------------------------------------------------
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:<JDBC_CLASSES>

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

   java examples.jdbc.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.jdbc.Agent


NOTE:
     When using the Cloudscape JBMS database with JDK 1.1.6
     bundled with Solaris disable the JIT compiler
     by setting the environment variable JAVA_COMPILER,
     for example:
                  % setenv JAVA_COMPILER
     This is to avoid problems caused by the JIT compiler when
     using the Cloudscape JBMS database.
