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


Entity beans "Account"
----------------------
AccountImpl	entity bean with "container managed" persistance
AccountExpl	entity bean with "bean managed" persistance

Since these 2 bean use the same table for persistance, they are set
as "shared" (see jonas-eb.xml).

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. InstantDB1.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. InstantDB1). See JOnAS
  documentation for more details.
  You must also, the first time you run the test, create the table in the database,
  using one of the scripts provided in this directory (Account.sql for example)

1) Run an EJB 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 :
	
	AccountImplBean available
	AccountExplBean available
	
3) Run the client program:

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

On Windows:
	jclient -cp %JONAS_BASE%\ejbjars\eb.jar eb.ClientAccount AccountImplHome
	jclient -cp %JONAS_BASE%\ejbjars\eb.jar eb.ClientAccount AccountExplHome
	
In fact, the "-cp" option is not useful here, because classes are found in the CLASSPATH.

4) Stop the jonas server
	jonas stop


Notice on the AccountImp2 example
---------------------------------
In addition to
- AccountExpl, entity bean with "bean managed" persistance, and
- AccountImpl, entity bean with "container managed" persistance conforms to EJB 1.1
there is a third bean
- AccountImpl2, entity bean with "container managed" persistance conforms to EJB 2.
This example shows how to write the Account bean conforms to the new
"container managed" persistance, EJB 2.

This example is commented in the two XML deployment descriptors 'eb.xml' and 'jonas-eb.xml'.
To run it, you must:
- uncomment it in those two XML files,
- re-build the eb example,
- add the 'datasource.mapper' property value in your <datasource>.properties file,
- re-run the EJB server via jonas start,
  (the 'datasource.mappername' property must be up-to-date in your
   '<datasource>.properties' file),
- re-load the eb.jar via jonas admin command,
- run the client program
  $ jclient -cp $JONAS_BASE/ejbjars/eb.jar eb.ClientAccount AccountImpl2Home
