Configure Shared Subscriptions Oracle Fusion Middleware Online Documentation Library

4-20 Configuring and Managing JMS for Oracle WebLogic Server distributed queue member, irrespective of whether the Load Balancing option is enabled. For more information about procedures for recovering from a WebLogic Server failure, see Recovering From a Server Failure in Programming JMS for Oracle WebLogic Server.

4.6 Configure an Unrestricted ClientID

The Client ID Policy specifies whether more than one JMS connection can use the same Client ID in a cluster. Valid values for this policy are: ■ RESTRICTED: The default. Only one connection that uses this policy can exist in a cluster at any given time for a particular Client ID if a connection already exists with a given Client ID, attempts to create new connections using this policy with the same Client ID fail with an exception. ■ UNRESTRICTED: Connections created using this policy can specify any Client ID, even when other restricted or unrestricted connections already use the same Client ID. When a durable subscription is created using an Unrestricted Client ID, it can only be cleaned up using weblogic.jms.extensions.WLSession.unsubscribeTopic topic, String name. See Managing Subscriptions in Programming JMS for Oracle WebLogic Server. Oracle recommends setting the Client ID policy to Unrestricted for new applications unless your application architecture requires exclusive Client IDs, especially if sharing a subscription durable or non-durable. Subscriptions created with different Client ID policies are always treated as independent subscriptions. See ClientIdPolicy in the Oracle WebLogic Server MBean Reference. To set the Client ID Policy on the connection factory using the WebLogic Console, see Configure multiple connections using the same client Id in the Oracle WebLogic Server Administration Console Help. The connection factory setting can be overridden programmatically using the setClientIDPolicy method of the WLConnection interface in the Oracle WebLogic Server API Reference. For more information on how to use the Client ID Policy, see: ■ Configure multiple connections using the same client Id in Oracle WebLogic Server Administration Console Help. ■ Developing Advanced PubSub Applications in Programming JMS for Oracle WebLogic Server

4.7 Configure Shared Subscriptions

The Subscription Sharing Policy specifies whether subscribers can share subscriptions with other subscribers on the same connection.aon this connection. Valid values for this policy are: Note: Programmatically changing overriding the Client ID policy settings on a JMS connection runtime object is valid only for that particular connection instance and for the life of that connection. Any changes made to the connection runtime object are not persistedreflected by the corresponding JMS connection factory configuration defined in the underlying JMS module descriptor. Configuring Advanced JMS System Resources 4-21 ■ Exclusive: The default. All subscribers created using this connection factory cannot share subscriptions with any other subscribers. ■ Sharable: Subscribers created using this connection factory can share their subscriptions with other subscribers, regardless of whether those subscribers are created using the same connection factory or a different connection factory. Consumers can share a non-durable subscriptions only if they have the same Client ID and Client ID Policy; consumers can share a durable subscription only if they have the same Client ID, Client ID Policy, and Subscription Name. WebLogic JMS applications can override the Subscription Sharing Policy specified on the connection factory configuration by casting a javax.jms.Connection instance to weblogic.jms.extension.WLConnection and calling setSubscriptionSharingPolicyString. Most applications with a Sharable Subscription Sharing Policy will also use an Unrestricted Client ID Policy in order to ensure that multiple connections with the same client ID can exist. Two durable subscriptions with the same Client ID and Subscription Name are treated as two different independent subscriptions if they have a different Client ID Policy. Similarly, two Sharable non-durable subscriptions with the same Client ID are treated as two different independent subscriptions if they have a different Client ID Policy. For more information on how to use the Subscription Sharing Policy, see: ■ Configure a connection factory subscription sharing policy in Oracle WebLogic Server Administration Console Help. ■ Developing Advanced PubSub Applications in Programming JMS for Oracle WebLogic Server 4-22 Configuring and Managing JMS for Oracle WebLogic Server 5 Configuring JMS Application Modules for Deployment 5-1 5 Configuring JMS Application Modules for Deployment These sections explain how to configure JMS application modules for deployment, including JMS application modules packaged with a Java EE enterprise application and globally-available, standalone application modules. ■ Section 5.1, Methods for Configuring JMS Application Modules