Entity Beans

In this example, two beans share the same interface (Account), one uses bean-managed persistence (explicit persistence), the other uses container-managed persistence (implicit persistence). This is a good example to understand what must be done or not done for persistence, depending on the chosen mode of persistence.

Finding the example application

The Entity Bean example application is located in the $JONAS_ROOT/example/src/eb directory. It is composed of the following files:

-rw-r--r--    701 Nov 27 17:21 Account.idb
-rw-r--r--   1509 Mar 16  2000 Account.java
-rw-r--r--    546 Oct 28  1999 Account.sql
-rw-r--r--  18384 Feb 11 15:52 AccountExplBean.java
-rw-r--r--   1673 Feb 11 15:52 AccountHome.java
-rw-r--r--  10433 Feb 11 15:52 AccountImplBean.java
-rw-r--r--   5730 Jul  6  2001 ClientAccount.java
-rw-r--r--   1331 Feb 11 15:52 Makefile
-rw-r--r--   1341 Sep 25 09:09 README
-rw-r--r--   2220 Feb 11 15:52 compile.bat
-rw-r--r--   2027 Feb 11 15:52 compile.sh
drwxr-xr-x   1024 Feb 20 00:01 davidclt
-rw-r--r--   9325 Nov 27 17:21 db1.prp
-rw-r--r--   2075 Feb 11 15:52 ejb-jar.xml
-rw-r--r--   1508 Feb 11 15:52 jonas-ejb-jar.xml
-rw-r--r--   1117 Sep 25 09:09 jonas.properties

Check that you don't miss any file before proceeding to the next section.