![Red Hat Application Server Скачать руководство пользователя страница 24](http://html.mh-extra.com/html/red-hat/application-server/application-server_manual_1427406024.webp)
16
Chapter 2. Getting Started with JOnAS
Rollback the transaction
Request outside any transaction
ClientOp OK. Exiting.
5. Before ending this session, be sure to stop the JOnAS server:
service jonas stop
These instructions are also located in the
README
file in the working directory.
2.1.4. Understanding Why This Works
•
This example demonstrates that the
CLASSPATH
is correctly set because, when the JOnAS server is
launched, the
jonas
script calls the JOnAS
bootstrap
class.
The
jclient
script is being used to run the client. Note that the bean classes were found in
$JONAS_ROOT/examples/classes
. If this had not been the case, it would have been necessary
to call the
jclient
script with the
-cp "$JONAS_ROOT/ejbjars/sb.jar"
option.
•
The client has succeeded in contacting the JOnAS server because the client has a distributed refer-
ence that was previously registered in the naming service. To do this, server and client use
JNDI
(the Java Naming and Directory Interface). The
carol.properties
file (which contains the JNDI
configuration) is located in the
$JONAS_ROOT/conf
directory.
This
carol.properties
has the JNDI properties set to the default values.
With these default values, the
registry
runs on
localhost
on the default port (1099 for
RMI/JRMP).
By default, the
registry
is launched in the same JVM as the JOnAS Server.
2.2. More Complex Examples
2.2.1. Other JOnAS Examples
The following examples are located under
$JONAS_ROOT/examples/src
:
•
The eb example ($JONAS_ROOT/examples/src/eb/) uses Entity beans. (See Section 2.2.2
An Ex-
ample With Database Access
.)
The 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 for understanding what must be done, or not done, for persistence, based
on the chosen mode of persistence. It provides both a CMP 1.1 and a CMP 2.0 implementation.
•
The lb example ($JONAS_ROOT/examples/src/lb/) uses Entity beans with local interfaces.
A Session Bean,
Manager
, locally manages an Entity Bean,
Manac
, which represents an account.
This is a good example for understanding what must be done for a local client collocated with an
Entity Bean providing local interfaces.
•
The
jms
directory ($JONAS_ROOT/examples/src/jms/) contains a stateful Session Bean with
methods performing JMS operations and a pure JMS client message receptor.
A complete description of this example is in Section 26.6
A JMS EJB Example
.
•
The
mailsb
directory ($JONAS_ROOT/examples/src/mailsb/) contains a
SessionMailer
and
MimePartDSMailer Stateful Session beans
with methods providing a way for building and
sending mail.
Содержание Application Server
Страница 1: ...Red Hat Application Server JOnAS User Guide ...
Страница 8: ......
Страница 22: ...14 Chapter 1 Java Open Application Server JOnAS a J2EE Platform ...
Страница 58: ...50 Chapter 3 JOnAS Configuration ...
Страница 66: ...58 Chapter 5 JOnAS Class Loader Hierarchy ...
Страница 78: ...70 Chapter 6 JOnAS Command Reference ...
Страница 80: ......
Страница 86: ...78 Chapter 7 Developing Session Beans ...
Страница 136: ...128 Chapter 9 Developing Message Driven Beans ...
Страница 142: ...134 Chapter 10 Defining the Deployment Descriptor ...
Страница 148: ...140 Chapter 11 Transactional Behavior of EJB Applications ...
Страница 158: ...150 Chapter 14 EJB Packaging ...
Страница 162: ...154 Chapter 15 Application Deployment and Installation Guide ...
Страница 164: ......
Страница 176: ...168 Chapter 18 WAR Packaging ...
Страница 178: ......
Страница 184: ...176 Chapter 20 Defining the Client Deployment Descriptor ...
Страница 186: ...178 Chapter 21 Client Packaging ...
Страница 188: ......
Страница 192: ...184 Chapter 23 EAR Packaging ...
Страница 194: ......
Страница 200: ...192 Chapter 24 JOnAS Services ...
Страница 204: ...196 Chapter 25 JOnAS and the Connector Architecture ...
Страница 222: ...214 Chapter 27 Ant EJB Tasks Using EJB JAR ...
Страница 234: ...226 Chapter 29 Web Services with JOnAS ...
Страница 236: ......
Страница 260: ...252 Chapter 34 How to use Axis in JOnAS ...
Страница 270: ...262 Chapter 36 Web Service Interoperability between JOnAS and BEA WebLogic ...
Страница 296: ......