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

This example illustrate the use of entity beans

Entity beans "Account"
----------------------
AccountImp2 entity bean with "container managed" persistance EJB2.x
AccountImpl	entity bean with "container managed" persistance EJB1.x
AccountExpl	entity bean with "bean managed" persistance


Compiling this example:
-----------------------
ant -find build.xml install


Running this example:
---------------------
Your database access should be configured: a properties file defining a
  Datasource object should be defined in $JONAS_BASE/conf (e.g. HSQL1.properties),
  and the property jonas.service.dbm.datasources of the jonas.properties file should
  be set to the name of this datasource description file (e.g. HSQL1). See JOnAS
  documentation for more details.
  You must also, the first time you run the test, create the table in the database.
  If you use the default database embedded in JOnAS (hsqldb) you only have to do
  ant init_db  (in this directory) after having started JOnAS.
  For Other databases scripts SQL are provided Account.sql for Oracle
  Account.pgsql for Postgres.


1) Run an JOnAS Server to make beans available to clients:

	jonas start

2) Load the eb.jar if you have not added 'eb.jar' in the ejb service descriptors list :

on UNIX:
	jonas admin -a eb.jar

On Windows:
    jonas admin -a eb.jar

You can also use the management console if the web service is activated.

You should see something like this when the bean is loaded :

	AccountImpl2 available
	AccountImpl available
	AccountExpl available


3) Run the client program:

on UNIX:
	jclient -cp $JONAS_BASE/ejbjars/eb.jar:$JONAS_ROOT/examples/classes eb.ClientAccount AccountImpl2Home
	jclient -cp $JONAS_BASE/ejbjars/eb.jar:$JONAS_ROOT/examples/classes eb.ClientAccount AccountImplHome
	jclient -cp $JONAS_BASE/ejbjars/eb.jar:$JONAS_ROOT/examples/classes eb.ClientAccount AccountExplHome

On Windows:
	jclient -cp %JONAS_BASE%\ejbjars\eb.jar;%JONAS_ROOT%\examples\classes eb.ClientAccount AccountImplHome
	jclient -cp %JONAS_BASE%\ejbjars\eb.jar;%JONAS_ROOT%\examples\classes eb.ClientAccount AccountImplHome
	jclient -cp %JONAS_BASE%\ejbjars\eb.jar;%JONAS_ROOT%\examples\classes eb.ClientAccount AccountExplHome



4) Stop the jonas server
	jonas stop



