4-4 Programming Message-Driven Beans for Oracle WebLogic Server
4.5 Best Practice
WebLogic clustering, and WebLogic JMS distributed destinations increase scalability and high availability. Oracle recommends that the machines that host a cluster have
identical or similar processing power, disk space, and memory to ensure well-load-balanced message processing. Similarly, it is recommended that the
WebLogic Server instances in a particular WebLogic cluster have homogenous JMS configuration and MDB deployments.
For an example, see Figure 4–1
. For additional information about distributed destinations, see Using Distributed Destinations in Programming JMS for Oracle
WebLogic Server.
5
Programming and Configuring MDBs: Main Steps 5-1
5
Programming and Configuring MDBs: Main Steps
This section provides step-by-step instructions for implementing an MDB using pre-EJB 3.0 style XML descriptors to configure its behavior. For an EJB 3.0 annotation
sample, see Section 10.6, Topic MDB Sample.
. For a summary of key deployment elements for MDBs, see
Chapter 11, Deployment Elements and Annotations for MDBs.
For an introduction to key deployment elements for topic MDBs, see
Chapter 10, Configuring and Deploying MDBs Using JMS Topics.
This chapter contains the following sections:
■
Section 5.1, Required JMS Configuration
■
Section 5.2, Create MDB Class and Configure Deployment Elements
5.1 Required JMS Configuration
The steps in the following section assume that you have access to the appropriate JMS components:
■
A JMS connection factory. A connection factory must be XA transaction global JTA transaction capable in
order to support transactional MDBs. The default WebLogic JMS MDB connection factory is XA-capable, is
automatically generated on WebLogic clusters, and is sufficient for the majority of MDBs that consume from WebLogic JMS destinations. For information about
WebLogic JMS default connection factories, see Using a Default Connection Factory in Configuring and Managing JMS for Oracle WebLogic Server.
For instructions about how to create a custom WebLogic JMS connection factory, see Create connection factories in a system module in Oracle WebLogic Server
Administration Console Help.
The default behavior and configuration methods for other JMS provider connection factories vary. If you use a non-Oracle JMS provider, see the vendor
documentation for details.
■
A JMS destination For instructions on configuring WebLogic JMS destinations, see Configure
Messaging in Oracle WebLogic Server Administration Console Help.
5-2 Programming Message-Driven Beans for Oracle WebLogic Server
5.2 Create MDB Class and Configure Deployment Elements