![]() ![]() ![]() ![]() ![]() ![]() ![]() |
The following sections provide tuning and best practice information for Message-Driven Beans (MDBs):
MDB transaction batching allows several JMS messages to be processed in one container managed transaction. Batching amortizes the cost of transactions over multiple messages and when used appropriately, can reduce or even eliminate the throughput difference between 2PC and 1PC processing. See Transaction Batching of MDBs in Programming WebLogic Enterprise JavaBeans.
Note: | Using batching may require reducing the number of concurrent MDB instances. If too many MDB instances are available, messages may be processed in parallel rather than in a batch. See MDB Thread Management. |
Note: | While batching generally increases throughput, it may also increase latency (the time it takes for an individual message to complete its MDB processing). |
Thread management for MDBs is described in terms of concurrency—the number of MDB instances that can be active at the same time. The following sections provide information on MDB concurrency:
Table 10-1 provides information on how to determine the of concurrently running MDB instances for a server instance.
|
|||
Transactional MDBs with batching enabled create a dedicated polling thread for each deployed MDB. This polling thread is not allocated from the pool specified by dispatch-policy
, it is an entirely new thread in addition to the all other threads running on the system. See Use Transaction Batching.
The following section provides general information on selecting a concurrency stategy for your applications:
Note: | Every application is unique, select a concurrency stategy based on how your application performs in its environment. |
min-threads-constraint
or by using a custom execute queue. max-threads-constraint
parameter and a high fair share setting. Note: | You must configure the max-threads-constraint parameter to override the default concurrency of 16. |
The following sections provide information on the behavior of WebLogic Server when using foreign vendor MDBs:
When using foreign MDBs, WebLogic Server determines conccurency as shown in Table 10-2.
The following section provides information on how threads are allocated when WebLogic Server interoperates with foreign vendor MDBs:
dispatch-policy
is ignored except for determining concurrency.dispatch-policy
.Note: | When using foreign transactional MDBs, some foreign vendors require a permanently allocated thread per concurrent MDB instance. These threads are drawn from the pool specified by dispatch-policy and are not returned to the pool until the MDB is undeployed. Since these threads are not shared, the MDB can starve other resources in the same pool. In this situation, you may need to increase the number of threads in the pool. |
![]() ![]() ![]() |