Copyright (C) BULL S.A. 1998-2002.


There are 3 kind of examples:
 - examples with enterprise java beans accessed from a simple client which
   is a java program, (these examples are all on examples/src);
 - examples with enterprise java beans accessed from a servlet,
   (those examples are examples/websample and examples/alarm).
 - 1 example of ear application: examples/earsample

There is also an other example on examples/jps, which is the well-known Java Pet Store
application. As the examples/jps directory doesn't contain the Pet Store sources,
the building of this example is not done via the build.xml of this current 'examples'
directory. (See examples/jps/README for more details).


Before compiling and running these examples, the installation and configuration
of JOnAS have to be done:

 - initialization of the JONAS_ROOT environment variable,
 - update of your PATH,
 - update of the JOnAS config_env script,
 - configuration of JNDI environment via the jndi.properties file
 - configuration of the database access:
	- update of the JOnAS config_env script,
	- configuration of JOnAS environment via the jonas.properties file,
	- update of the <datasource_name>.properties file.
 - configuration of Tomcat for JOnAS,
   (only for the websample and alarm examples).

Refer to install documentation for more information.



Compiling these examples:
------------------------
 Use the Ant 1.5 build tool in one of the directories where there is a build.xml file.

 You may have to modify before $JONAS_ROOT/examples/build.properties

 The default "install" target allows to build the examples and copy the builded ejb-jar 
 file in your JOnAS ejbjars directory.

 Example:
	export OBJECTWEB_ORB=RMI
	export JONAS_ROOT=<your install path>
	cd $JONAS_ROOT/examples; ant install


 Note: You can alternatively run the "compile.sh" shell script on Unix, or the "compile.bat"
       script on Windows in the example/src/sb directory to compile the 'sb' example.


Running these examples:
----------------------
Each example must be run in its own directory (See README files in each directory)
src		= simple examples
websample	= sample for web application
earsample	= sample for ear application
alarm		= the "alarm" demo
jps		= the "petstore" application
cmp2		= example of EJB2.0 persistence

For some of them, run.sh or run.bat scripts are provided.
