Table of Contents
1. Introduction..................................................................................................................................... 1
1.1. About this Guide................................................................................................................ 1
1.2. Enterprise JavaBeans ......................................................................................................... 1
1.2.1. What Does What? ............................................................................................... 1
1.2.2. JOnAS Features .................................................................................................. 3
1.2.3. Software Requirements....................................................................................... 4
2. Quick Start ...................................................................................................................................... 5
2.1. Setting Up the Red Hat Application Server Environment ................................................. 5
2.2. Running Your First EJB Application ................................................................................. 5
2.2.1. Building the Examples........................................................................................ 5
2.2.2. Quick Start to the SB Example ........................................................................... 6
3. Configuring Your Environment................................................................................................... 11
3.1. Setting Up Your Java Environment.................................................................................. 11
3.1.1. Configuring Ant ................................................................................................ 11
3.1.2. Configuring Your JOnAS Environment ............................................................ 11
4. Getting Started With JOnAS....................................................................................................... 13
4.1. Overview of the Tools...................................................................................................... 13
4.1.1. Starting and Stopping JOnAS ........................................................................... 13
4.1.2. JOnAS Configuration Files ............................................................................... 13
4.1.3. Database Access................................................................................................ 20
4.1.4. Loading Beans Using jonas.properties ............................................................. 21
4.1.5. JOnAS Administration...................................................................................... 21
4.1.6. Loading Beans Using jonas admin ................................................................... 21
4.1.7. Unloading Beans............................................................................................... 22
5. Session Beans................................................................................................................................. 23
5.1. Finding the Example Application .................................................................................... 23
5.2. Building the Example ...................................................................................................... 23
5.3. Running the SB Example................................................................................................. 23
5.4. Understanding Session Beans.......................................................................................... 24
5.5. Deployment Descriptor.................................................................................................... 24
6. Entity Beans................................................................................................................................... 27
6.1. Finding the Example Application .................................................................................... 27
6.1.1. Understanding Entity Beans ............................................................................. 27
6.1.2. Building the Example ....................................................................................... 27
6.1.3. Configuring Database Access ........................................................................... 28
6.1.4. Running the EB Example.................................................................................. 29
7. Message-Driven Beans.................................................................................................................. 31
7.1. Building the Examples..................................................................................................... 31
7.2. Running the Examples ..................................................................................................... 31
7.3. Understanding Message-Driven Beans ............................................................................ 32
8. Accessing Beans From a Servlet .................................................................................................. 35
8.1. Quick Introduction to Servlets......................................................................................... 35
8.2. Retrieving a Home Interface and Creating a Bean .......................................................... 35
8.3. Initiating a Transaction From a Servlet............................................................................ 36
9. Accessing Beans From a JSP ....................................................................................................... 39
9.1. Accessing a Bean From a JSP.......................................................................................... 39