The connection factory is the JMS resource used by the client application to control the behavior of the load balance algorithm used when publishing JMS messages to the distributed destination and its queue or topic members.
An application deployed in a production environment should preferably use a custom connection factory that can be tuned to fit the application requirements so as to avoid using the default WebLogic connection factories. The JMS message-publishing and load-balancing behavior can be tuned by changing the server affinity configuration of the connection factory. By default, the load-balancing and server-affinity options of the connection factory are enabled.
The JMSApp
application uses the connection factory JMSAppCF
created in the previous recipe to connect and publish JMS messages to the distributed queue JMSAppQueue
.
Disabling the server affinity of the connection factory will force the load balance...