Skip Headers
Oracle® Fusion Middleware Programming Message-Driven Beans for Oracle WebLogic Server
11g Release 1 (10.3.3)

Part Number E15493-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
View PDF

10 Deployment Elements for MDBs

This section lists key deployment elements that affect the behavior of MDBs:

message-destination-descriptor Element of the weblogic-ejb-jar.xml File

Table 10-1 summarizes the deployment elements in the message-destination-descriptor element of weblogic-ejb-jar.xml.

Table 10-1 weblogic-ejb-jar.xml Deployment Elements for MDBs

Element Description Default

connection-factory-jndi-name

The JNDI name of the JMS ConnectionFactory that the message-driven EJB should look up to create its queues and topics. See How to Set connection-factory-jndi-name.

weblogic.jms.MessageDriven.BeanConnection.Factory

connection-factory-resource-link

Maps to a resource within a JMS module defined in ejb-jar.xml to an actual JMS Module Reference in WebLogic Server.

n/a

destination-jndi-name

The JNDI name used to associate a MDB with an actual JMS Queue or Topic deployed in the WebLogic Server JNDI tree. See How to Set destination-jndi-name.

n/a

destination-resource-link

Maps to a resource within a JMS module defined in ejb-jar.xml to an actual JMS Module Reference in WebLogic Server.

n/a

dispatch-policy

This optional element allows you to specify a particular WorkManager for the bean.

n/a

distributed-destination-connection

Specifies whether an MDB that accesses a WebLogic JMS distributed queue in the same cluster consumes from all distributed destination members or only those members local to the current Weblogic Server.

LocalOnly (only consumes from members local to the current WebLogic Server)

durable-subscription-deletion

Indicates whether you want durable topic subscriptions to be automatically deleted when an MDB is undeployed or removed.

False

generate-unique-jms-client-id

Indicates whether or not you want the EJB container to generate a unique client-id for every instance of an MDB. Enabling this flag makes it easier to deploy durable MDBs to multiple server instances in a WebLogic Server cluster.

False

init-suspend-seconds

The initial number of seconds to suspend an MDB's JMS connection when the EJB container detects a JMS resource outage. See Configuring Suspension of Message Delivery During JMS Resource Outages.

5

initial-beans-in-free-pool

The number of inactive instances of an MDB that exist in WebLogic Server when it is started.

0

initial-context-factory

The initial contextFactory that the EJB container uses to create its connection factories. See How to Set initial-context-factory.

weblogic.jndi.

WLInitialContext

Factory

jms-client-id

The client id for the a message-driven bean associated with a durable subscriber topic. See "Defining the Client ID" in Programming JMS for Oracle WebLogic Server.

ejb-name of the EJB

jms-polling-interval-seconds

The number of seconds between attempts by the EJB container to reconnect to a JMS destination that has become unavailable. See Migration and Recovery for Clustered MDBs.

10 seconds

max-beans-in-free-pool

The maximum size of the free pool of inactive MDBs.

1000

max-messages-in-transaction

Specifies the maximum number of messages that can be in a transaction for this MDB.

n/a

max-suspend-seconds

The maximum number of seconds to suspend an MDB's JMS connection when the EJB container detects a JMS resource outage. See Configuring Suspension of Message Delivery During JMS Resource Outages.

60

pool

Configures the behavior of the WebLogic Server free pool for message-driven EJBs.

n/a

provider-url

The URL provider to be used by the InitialContext. Typically, this is the host:port. See How to Set provider-url.

t3://localhost:7001

resource-adapter-jndi-name

Identifies the resource adapter that this MDB receives messages from.

n/a

security-role-assignment

Maps application roles in the ejb-jar.xml file to the names of security principals available in WebLogic Server.

n/a

timer-descriptor

An EJB timer object. For more information, see Programming the EJB Timer Service in Programming WebLogic Enterprise JavaBeans for Oracle WebLogic Server.

n/a

trans-timeout-seconds

The maximum duration for an EJB's container-initiated transactions, in seconds, after which the transaction is rolled back. See Configuring Transaction Management Strategy for an MDB.

30

use81-style-polling

Enables backwards compatibility for WLS Version 8.1-style polling.

False


ejb Element of the weblogic-application.xml File

Table 9–2 lists key deployment elements for MDBs in the ejb element of weblogic-application.xml.

Table 10-2 weblogic-application.xml Elements for MDBs

Element Description Default

start-mdbs-with-application

Controls when MDBs start processing messages. With default setting of true, an MDB starts processing messages as soon as it is deployed, even if WebLogic Server has not completed booting. This can cause an MDB application to access uninitialized services or applications during boot up and, therefore, to fail.

Set to false to defer message processing until after WebLogic Server opens its listen port.

false


message-driven Element of the ejb-jar.xml File

Table 9–3 lists key J2EE deployment elements for MDBs that you configure in the message-driven element of ejb-jar.xml.

Table 10-3 Key J2EE Deployment Elements for MDBs

Element Description Allowable Values

acknowledge-mode

Specifies JMS message acknowledgment semantics for the onMessage method of a message-driven bean that uses bean managed transaction demarcation.

  • AUTO_ACKNOWLEDGE

  • DUPS_OK_ACKNOWLEDGE

activation-config

Defines information about the expected configuration properties of the message-driven bean in its operational environment. This may include information about message acknowledgement, message selector, expected destination type, and so on.

The configuration information is expressed in terms of name/value configuration properties.

The properties that are recognized for a particular message-driven bean are determined by the messaging type.

destination-type

Specifies the type of the JMS destination—the Java interface expected to be implemented by the destination.

  • javax.jms.Queue

  • javax.jms.Topic

message-destination

Specifies the type of the destination.

Specified by the Java interface expected to be implemented by the destination.

messaging-type

Specifies the message listener interface of the message-driven bean.

Valid message listener interface.

subscription-durability

Specifies whether a JMS topic subscription is intended to be durable or nondurable.

  • Durable

  • NonDurable

transaction-type

Specifies an enterprise bean's transaction management type.

Note: If transaction-type is set to Container, trans-attribute must be set to Required.

  • Bean

  • Container

trans-attribute

Specifies how the container must manage the transaction boundaries when delegating a method invocation to an enterprise bean's business method.

Set to Required for container-managed transactions. For more information, see Section 5.6.5, "Configuring Transaction Management Strategy for an MDB."

  • Required

  • NotSupported


activationConfig Properties

Table 10-4 summarizes activationConfig name-value pairs supported by WebLogic Server.

Table 10-4 activationConfig Properties

ActivationConfigProperty Property Name Description Default

connectionFactoryJndiName

The JNDI name of the JMS ConnectionFactory that the message-driven EJB should look up to create its queues and topics. See How to Set connection-factory-jndi-name.

weblogic.jms.MessageDriven.BeanConnection.Factory

connectionFactoryResourceLink

Maps to a resource within a JMS module defined in ejb-jar.xml to an actual JMS Module Reference in WebLogic Server.

n/a

destinationJndiName

The JNDI name used to associate a MDB with an actual JMS Queue or Topic deployed in the WebLogic Server JNDI tree. See How to Set destination-jndi-name.

n/a

destinationResourceLink

Maps to a resource within a JMS module defined in ejb-jar.xml to an actual JMS Module Reference in WebLogic Server.

n/a

distributedDestinationConnection

Specifies whether an MDB that accesses a WebLogic JMS distributed queue in the same cluster consumes from all distributed destination members or only those members local to the current Weblogic Server.

LocalOnly (only consumes from members local to the current WebLogic Server)

durableSubscriptionDeletion

Indicates whether you want durable topic subscriptions to be automatically deleted when an MDB is undeployed or removed.

False

initSuspendSeconds

The initial number of seconds to suspend an MDB's JMS connection when the EJB container detects a JMS resource outage. See Configuring Suspension of Message Delivery During JMS Resource Outages.

5

initialContextFactory

The initial contextFactory that the EJB container uses to create its connection factories. See How to Set initial-context-factory.

weblogic.jndi.

WLInitialContext

Factory

jmsClientId

The client id for the a message-driven bean associated with a durable subscriber topic. See "Defining the Client ID" in Programming JMS for Oracle WebLogic Server.

ejb-name of the EJB

jmsPollingIntervalSeconds

The number of seconds between attempts by the EJB container to reconnect to a JMS destination that has become unavailable. See Migration and Recovery for Clustered MDBs.

10 seconds

maxMessagesInTransaction

Specifies the maximum number of messages that can be in a transaction for this MDB.

n/a

maxSuspendSeconds

The maximum number of seconds to suspend an MDB's JMS connection when the EJB container detects a JMS resource outage. See Configuring Suspension of Message Delivery During JMS Resource Outages.

60

providerURL

The URL provider to be used by the InitialContext. Typically, this is the host:port. See How to Set provider-url.

t3://localhost:7001

resourceAdapterJndiName

Identifies the resource adapter that this MDB receives messages from.

n/a

use81StylePolling

Enables backwards compatibility for WLS Version 8.1-style polling.

False