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


There is two kind of examples:
 - examples with enterprise java beans accessed from a sample client which
   is a java program, (thoses examples are all on examples/src);
 - examples with enterprise java beans accessed from a servlet in TOMCAT,
   (thoses examples are examples/websample and examples/alarm).


Before compiling and running those 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,
   (only if you not choose the default distributed processing environment RMI),
 - 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.
   (only for the eb, mdb/sampleappli and alarm examples),
 - configuration of Tomcat for JOnAS,
   (only for the websample and alarm examples).


Refer to install documentation for more information.



There are 3 ways to compile these examples:

 - run the "compile.sh" shell script on Unix, or the "compile.bat" script on Windows 
   in each example directory (ie in src/sb, src/eb, src/jms, src/mdb/samplemdb,
   src/mdb/sampleappli, websample, and alarm);

 - use the gnu make in the current directory.
   In this case, for NT users, you must use the cygnus package to get the UNIX
   like stuff, and you have to configure your classpath by changing the file:
	$JONAS_ROOT/gmk/config.mk
   before running
	make install
   "make install" allows to build the examples, but also
     - copy the builded ejb-jar file in your JOnAS ejbjars directory, and
     - copy the builded .war file in your tomcat webapps directory.

 - use the Ant 1.4 build tool in the "examples" directory,
   or "examples/src", "examples/websample" and "examples/alarm" directories.
   In this case, run the Ant tool
	- as it is showned in the "build.sh" shell script on Unix,
	  or the "build.bat" script on Windows,
	  without any modification of the $JONAS_ROOT/examples/build.properties
	  file,
	- or after you have modified the $JONAS_ROOT/examples/build.properties.
   The default "install" target allows to build the examples, but also
     - copy the builded ejb-jar file in your JOnAS ejbjars directory, and
     - copy the builded .war file in your tomcat webapps directory.

Note that the "TOMCAT_HOME" variable is only needed for the "websample"
and "alarm" examples.



To run those examples, you have no more to run first the registry.
(Indeed, by default the registry is launched inside the EJB server
 by the way of the new JOnAS property 'jonas.registry';
 its default value is 'automatic'.)
