Understanding Session Beans; Deployment Descriptor - Red Hat APPLICATION SERVER - JONAS Tutorial

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

Advertisement

24
1. As
, start the Red Hat Application Server server with the following command:
root
/sbin/service jonas start
2. Start the Java Client:
jclient sb.ClientOp
A successful run should output:
Create a bean
Start a first transaction
First request on the new bean
Second request on the bean
Commit the transaction
Start a second transaction
Rollback the transaction
Request outside any transaction
ClientOp OK. Exiting.
Congratulations! You have succeeded running your first EJB application with JOnAS!
3. Stop the JOnAS server:
/sbin/service jonas stop

5.4. Understanding Session Beans

Here is a description of the files that reside in the
ClientOp.java
is the JOnAS specific part of the deployment descriptor.
jonas-sb.xml
contains the bean implementation code.
OpBean.java
contains the home interface of the bean.
OpHome.java
contains the remote interface of the bean.
Op.java
is the standard part of the deployment descriptor.
sb.xml

5.5. Deployment Descriptor

Here is the standard
sb.xml
?xml version="1.0" encoding="ISO-8859-1"?
¡
!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems,
¡
Inc.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd"
ejb-jar
¡
¢
description
¡
¢
sb JOnAS example
display-name
¡
enterprise-beans
¡
session
¡
¢
ejb-name
¡
home
sb.OpHome
¡
¢
remote
sb.Op
¡
¢
ejb-class
¡
session-type
¡
transaction-type
¡
env-entry
¡
env-entry-name
¡
is the Java client that accesses the JOnAS server.
deployment descriptor:
Deployment descriptor for the
/description
¡
sb example
/display-name
¡
¢
¢
Op
/ejb-name
¡
¢
¢
/home
¡
¢
/remote
¡
¢
sb.OpBean
/ejb-class
¡
¢
Stateful
/session-type
¡
¢
Container
¢
¢
prop1
¡
¢
$JONAS_ROOT/examples/src/sb
¢
¢
¢
¢
¢
¢
/transaction-type
¡
/env-entry-name
¢
Chapter 5. Session Beans
directory:
¢

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the APPLICATION SERVER - JONAS and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Application server

Table of Contents