Determining the Number of Concurrent MDBs Selecting a Concurrency Strategy

11-2 Performance and Tuning for Oracle WebLogic Server

11.2.1 Determining the Number of Concurrent MDBs

Table 11–1 provides information on how to determine the number of concurrently running MDB instances for a server instance. Transactional WebLogic MDBs use a synchronous polling mechanism to retrieve messages from JMS destinations if they are either: A listening to non-WebLogic queues; or B listening to a WebLogic queue and transaction batching is enabled. See Section 11.5, Token-based Message Polling for Transactional MDBs Listening on QueuesTopics .

11.2.2 Selecting a Concurrency Strategy

The following section provides general information on selecting a concurrency strategy for your applications: ■ In most situations, if the message stream has bursts of messages, using an unconstrained work manager with a high fair share is adequate. Once the messages in a burst are handled, the threads are returned to the self-tuning pool. ■ In most situations, if the message arrival rate is high and constant or if low latency is required, it makes sense to reserve threads for MDBs. You can reserve threads by either specifying a work manager with a min-threads-constraint or by using a custom execute queue. ■ If you migrate WebLogic Server 8.1 applications that have custom MDB execute queues, you can: – Continue to use a custom MDB execute queue, see Appendix A, Using the WebLogic 8.1 Thread Pool Model. – Convert the MDB execute queue to a custom work manager that has a configured max-threads-constraint parameter and a high fair share setting. Table 11–1 Determining Concurrency for WebLogic Server MDBs Type of work manager or execute queue Threads Default work manager or unconstrained work manager varies due to self-tuning, up to Minmax-beans-in-free-pool,16 Default work manager with self-tuning disabled Mindefault-thread-pool-size2+1, max-beans-in-free-pool This is also the default thread pool concurrency algorithm for WebLogic Server 8.1 Custom execute queue Minexecute-queue-size, max-beans-in-free-pool Custom work manager with constraint varies due to self-tuning, between min-thread-constraint and Minmax-threads-constraint, max-beans-in-free-pool Note: Every application is unique, select a concurrency strategy based on how your application performs in its environment. Tuning Message-Driven Beans 11-3 ■ In WebLogic Server 8.1, you could increase the size of the default execute queue knowing that a larger default pool means a larger maximum MDB concurrency. Default thread pool MDBs upgraded to WebLogic Server 9.0 will have a fixed maximum of 16. To achieve MDB concurrency numbers higher than 16, you will need to create a custom work manager or custom execute queue. See Table 11–1 .

11.2.3 Thread Utilization When Using WebLogic Destinations