Concurrency for MDBs that Process Messages from Foreign Destinations Thread Utilization for MDBs that Process Messages from Foreign Destinations

11-4 Performance and Tuning for Oracle WebLogic Server Transactional MDBs automatically force concurrency to 1 regardless of the max-beans-in-free-pool setting.

11.3 Best Practices for Configuring and Deploying MDBs Using Distributed Topics

Message-driven beans provide a number of application design and deployment options that offer scalability and high availability when using distributed topics. For more detailed information, see Configuring and Deploying MDBs Using Distributed Topics in Programming Message-Driven Beans for Oracle WebLogic Server.

11.4 Using MDBs with Foreign Destinations

The following sections provide information on the behavior of WebLogic Server when using MDBs that consume messages from Foreign destinations: ■ Section 11.4.1, Concurrency for MDBs that Process Messages from Foreign Destinations ■ Section 11.4.2, Thread Utilization for MDBs that Process Messages from Foreign Destinations

11.4.1 Concurrency for MDBs that Process Messages from Foreign Destinations

The concurrency of MDBs that consume from destinations hosted by foreign providers non-WebLogic JMS destinations is determined using the same algorithm that is used for WebLogic JMS destinations.

11.4.2 Thread Utilization for MDBs that Process Messages from Foreign Destinations

The following section provides information on how threads are allocated when WebLogic Server interoperates with MDBs that process messages from foreign destinations: Caution: Non-transactional Foreign Topics: Oracle recommends explicitly setting max-beans-in-free-pool to 1 for non-transactional MDBs that work with foreign non-WebLogic topics. Failure to do so may result in lost messages in the event of certain failures, such as the MDB application throwing Runtime or Error exceptions. Unit-of-Order: Oracle recommends explicitly setting max-beans-in-free-pool to 1 for non-transactional Compatibility mode MDBs that consume from a WebLogic JMS topic and process messages that have a WebLogic JMS Unit-of-Order value. Unit-of-Order messages in this use case may not be processed in order unless max-beans-in-free-pool is set to 1. Note: The term Foreign destination in this context refers to destinations that are hosted by a non-WebLogic JMS provider. It does not refer to remote WebLogic destinations. Tuning Message-Driven Beans 11-5 ■ Non-transactional MDBs use a foreign vendors thread, not a WebLogic Server thread. In this situation, the dispatch-policy is ignored except for determining concurrency. ■ Transactional MDBs run in WebLogic Server threads, as follow: – MDBs listening on topics — Each deployed MDB uses a dedicated daemon polling thread that is created in Non-Pooled Threads thread group. – MDBs listening on queues — Instead of a dedicated thread, each deployed MDB uses a token-based, synchronous polling mechanism that always uses at least one thread from the dispatch-policy. See Section 11.5, Token-based Message Polling for Transactional MDBs Listening on QueuesTopics