C How WebLogic MDBs Leverage WebLogic JMS Extensions

Examine how MDBs utilize certain WebLogic JMS features such as shared subscriptions, and unrestricted client IDs.

The MDB deployment scenarios described in Topic Deployment Scenarios. take advantage of the following JMS features:

  • Shared subscriptions -- Shared subscriptions allow multiple subscribers to share one subscription, even when the subscribers are created from different MDB servers. All subscribers that share the same subscription collectively process all of the messages published to the topic. Each message is processed by only one of the subscribers. For example, if there are two subscribers, S1 and S2, and three messages, M1, M2, and M3, S1 might receive M1 and M2 (but not M3) and, then, S2 would receive M3 (but not M1 and M2).

    This enables applications to employ "round-robin" distributed or parallel processing of a single subscription's topic messages. MDBs can create multiple subscribers on the same subscription identifier, whether it is durable or non-durable. For more information about the JMS Subscription Sharing Policy, see Configure Shared Subscriptions in Administering JMS Resources for Oracle WebLogic Server.

  • Unrestricted Client IDs -- Unrestricted Client IDs allow multiple concurrently active connections to use the same Client ID. The JMS clientID identifies a JMS connection and is used to identify a durable subscription on that connection. Setting the clientID to Unrestricted allows you to create multiple physical subscriptions, with the same name, on different destinations. This allows subscriptions with the same name to exist on different members of the same distributed topic, and together, these subscriptions can be treated as a single logical subscription. See Configure an Unrestricted Client ID in Administering JMS Resources for Oracle WebLogic Server.

The topicMessagesDistributionMode defines permutations of the JMS attributes SubscriptionSharingPolicy and ClientIdPolicy (set on the connection factory), to control how messages are distributed to distributed topics. Oracle WebLogic Server sets those values as shown in Table C-1.

Table C-1 Relationships Between topicMessagesDistributionMode Settings and Settings on JMS Connection Factory

topicMessagesDistributionMode SubscriptionSharingPolicy ClientIdPolicy

One-Copy-Per-Server or One-Copy-Per-Application



Compatibility (replicated distributed topics and foreign topics only)



If the settings on the connection factory are not these values, Oracle WebLogic Server overrides them and gives a warning message. If Oracle WebLogic Server cannot override the values for any reason, it throws an exception, and the MDB cannot process any messages unless the administrator changes the settings on the JMS connection factory. You cannot programmatically set these attributes on the connection factory directly. Instead, use topicMessagesDistributionMode, and the MDB deployment will set the values on the connection instances.