![]() |
The extnded messaging service configuration file has the following general format:<Config> <Pooling> <Timeout>timeoutMilliSeconds</Timeout> <Threshold>maxUnusedConnections</Threshold> </Pooling> <Listener> <HomeJNDIName>homeName</HomeJNDIName> <JMSConnectionFactory>factoryName</JMSConnectionFactory> <JMSDestination>destinationName</JMSDestination> <JMSDestinationType>destinationType</JMSDestinationType> <JMSSubscriptionDurability>durability</JMSSubscriptionDurability> <JMSSubscriptionName>subscriptionName</JMSSubscriptionName> <JMSMessageSelector>selector</JMSMessageSelector> <JMSAcknowledgeMode>acknowledgeMode</JMSAcknowledgeMode> <MaxRetries>retries</MaxRetries> <MaxSessions>sessions</MaxSessions> <Transactional>trueFalse</Transactional> </Listener> </Config>
<Config> Pooling-property-setListener-property-sets </Config>The scope of the JMS Listener configuration data, containing one <Pooling> property set and one or more <Listener> property sets. There must be only one <Config> tag pair in the configuration file.
<Pooling>Timeout-property-tag Threshold-property-tag</Pooling>This defines the scope of MQSeries connection pooling options. The ConnectionManager allocates connections on a most-recently-used basis, and destroys connections on a least-recently-used basis. You can specify the time that a connection is kept within the pool (<Timeout>) and the maximum number of unused connections (<Threshold>). There must be only one <Pooling> tag pair in the configuration file.
<Timeout> timeoutMilliSeconds</Timeout>The number of milliseconds an unused connection is retained within the pool. The default is 300000 milliseconds (five minutes).
<Threshold>maxUnusedConnections </Threshold>The maximum number of unused connections that are retained within the pool. The default is 10.
<Listener>property_tags </Listener>The scope of each JMS listener destination. Each <Listener> tag pair contains the following properties (property_tags).
<HomeJNDIName>bean_home_name </HomeJNDIName>The JNDI lookup name for the home of the message bean (a stateless session bean) that is invoked by this JMS listener, in the form: bean_name/bean_name.
<JMSConnectionFactory>connection_factory_name</JMSConnectionFactory>The name of the JMS connection factory that you defined within JNDI (by using the JMSAdmin tool). For more information about defining this factory name, see Configuring the extended messaging service.
<JMSDestination>jms_destination </JMSDestination>The name of the JMS destination to be monitored by this listener, and that you defined within JNDI (by using the JMSAdmin tool). The value has the form: jms/destination_name, where jms is the name of your JMS function and destination_name is the name of the destination. For more information about defining this factory name, see Configuring the extended messaging service.
<JMSDestinationType>destination_type </JMSDestinationType>The type of JMS destination being monitored by the listener. The destination_type value must be specified as one of the following to match the type specified by the Java interface implemented by the destination:
- javax.jms.Queue
- (The default.)
- javax.jms.Topic
This property is used for guidance to the deployer as to what type of destination to bind. The JMSListener runtime creation assumes the type of the object returned from JNDI. If the value specified is not valid (neither javax.jms.Queue nor javax.jms.Topic), then an XMLParse error is issued to the console when the JMS Listener initializes.
<JMSSubscriptionDurability> durability</JMSSubscriptionDurability>Whether or not a JMS topic subscription is intended to be durable or nondurable. Specify this property only if the JMS Listener is to listen on a topic. The value is specified as one of the following:
- durable
- nondurable
- (The default.)
<JMSSubscriptionName>subscription-name </JMSSubscriptionName>A unique name that is associated with a durable subscriber, for JMS topic subscription.You must specify this property only if the JMS Listener is to listen on a topic, for durable subscriptions as indicated by the <JMSSubscriptionDurability>durable</JMSSubscriptionDurability> property.
<JMSMessageSelector>jms_message_selector </JMSMessageSelector>A JMS message selector that the listener uses to determine which messages a message bean is to receive; for example:
<JMSMessageSelector>JMSType = 'car' AND color = 'blue' AND weight > 2500</JMSMessageSelector>
<JMSAcknowledgeMode>acknowledgeMode </JMSAcknowledgeMode>Whether JMS AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE message acknowledgement semantics should be used for messages received by a non-transactional JMS listener. The value is specified as one of the following options:
- auto-acknowledge
- (The default.)
- dups-ok-acknowledge
<MaxRetries>maximum_retries </MaxRetries>The maximum number of retries that this listener attempts if it fails to retrieve a JMS message from the destination that it is monitoring. The value is an integer number of retries, greater than or equal to 0 (zero); default 0. A value of 0 (zero) indicates no retries.
<MaxSessions>maximum_sessions </MaxSessions>The maximum number of sessions that this listener can have with the destination that it is monitoring. The value is an integer number of sessions, greater than or equal to 1; default 1.
<Transactional>trueFalse </Transactional>Whether or not the listener should start a global transaction before reading a message from the destination that it is monitoring. The value is either True or False; default True.
Related tasks... | |
Configuring the extended messaging service | |