Understanding Message-Driven Beans - Red Hat APPLICATION SERVER - JONAS Tutorial

Jonas
Hide thumbs Also See for APPLICATION SERVER - JONAS:
Table of Contents

Advertisement

32
Note
The
can also be deployed using the web interface. The steps are similar to those described in
jar
Section 2.2.2 Quick Start to the SB Example, but using the file
To run the
sampleappli
client. Finally, at the end of the execution you should stop the JOnAS server.
Note
$JONAS_ROOT/examples/src/mdb/sampleappli
ample.
Here is how to proceed:
1. As
, start the Red Hat Application Server server with the following command:
root
/sbin/service jonas start
jonas admin -a sampleappli.jar
2. Start the Java Client:
jclient sampleappli.SampleAppliClient
A successful run should output something similar to:
For CustomerId = customer1 ProductId= 00001 Quantity= 5
For CustomerId = customer10 ProductId= 00003 Quantity= 3
For CustomerId = customer3 ProductId= 00002 Quantity= 2
For CustomerId = customer2 ProductId= 00004 Quantity= 6
For CustomerId = customer3 ProductId= 00001 Quantity= 10
For CustomerId = customer1 ProductId= 00002 Quantity= 5
For CustomerId = customer10 ProductId= 00004 Quantity= 3
For CustomerId = customer2 ProductId= 00003 Quantity= 10
For CustomerId = customer7 ProductId= 00002 Quantity= 2
For CustomerId = customer45 ProductId= 00001 Quantity= 4
For CustomerId = customer122 ProductId= 00003 Quantity= 6
Nb messages sent and received OK
StockId = 00000 Quantity = 10
StockId = 00004 Quantity = 1
StockId = 00001 Quantity = 1
StockId = 00003 Quantity = 1
StockId = 00002 Quantity = 1
SampleApplicationClient
3. As
, stop the Red Hat Application Server server:
root
/sbin/service jonas stop
Each example comes with a corresponding

7.3. Understanding Message-Driven Beans

Here is a description of the files that reside in the
directory:
contains important information that does not appear in the other documentation.
README
run.sh
example, you will have to first start the JOnAS server and then run the Java
OK
README
Chapter 7. Message-Driven Beans
samplemdb.jar
is assumed to be current folder in the following ex-
file.
$JONAS_ROOT/examples/src/mdb/samplemdb
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Application server

Table of Contents