![]() ![]() ![]() ![]() |
JMS Connection Factory
Column Display Related Tasks Related Topics
Connection factories are used to create connections for JMS clients. A connection factory supports concurrent use, enabling multiple threads to access it simultaneously. You can configure one or more connection factories to create connections with predefined parameters for the connections returned to JMS, such as specifying a default priority to use for messages when a priority is not explicitly defined on the message.
This page summarizes the JMS connection factories that have been created for this JMS module.
Column Display
You can show fewer or additional data points on this page by expanding Customize this table and modifying the Column Display list. Each data point displays in its own table column.
The following table lists all of the data points that you can display in columns on this page.
Name Description Name The name of this JMS connection factory.
MBean Attribute:
WebLogicMBean.Name
Changes take effect after you redeploy the module or restart the server.
JNDI Name The global JNDI name used to look up a connection factory within a clustered JNDI namespace.
In a clustered environment, this name is propagated to the entire cluster. If you want the JNDI name to be bound only on the local server, and not propagated to the rest of the cluster, then use the
Local JNDI Name
setting.If not specified, then the connection factory is not bound into a clustered JNDI namespace.
MBean Attribute (Does not apply to application modules) :
JmsConnectionFactoryBean.JNDIName
Client ID An optional client ID for a durable subscriber that uses this JMS connection factory. Configuring this value on the connection factory prevents more than one JMS client from using a connection from the factory. Generally, JMS durable subscriber applications set their client IDs dynamically using the javax.jms.Connection.setClientID() call.
MBean Attribute:
JMSConnectionFactoryMBean.ClientId
Default Priority The default priority used for messages when a priority is not explicitly defined.
All messages with a DefaultPriority of -1 that are produced on a connection created with this factory will receive this value. Message producers can get the priority explicitly by calling the
javax.jms.MessageProducer.getPriority()
method.This attribute is dynamic. It can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.
MBean Attribute (Does not apply to application modules) :
DefaultDeliveryParamsBean.DefaultPriority
Minimum value:
0
Maximum value:
9
Default Time-to-Live The maximum length of time, in milliseconds, that a message exists. This value is used for messages when both the
time-to-live
is not explicitly set by the sender application that is using this connection factory and thetime-to-live
is not explicitly overridden by the destination'sTimeToLiveOverride
attribute . A value of 0 indicates that the message has an infinite amount time to live.Message producer applications can set the
time-to-live
explicitly by calling the standard JMSjavax.jms.MessageProducer.setTimeToLive(long)
method. Note that programmatically settingtime-to-live
usingjavax.jms.Message.setJMSExpiration()
has no effect - the message setter is ignored by the JMS send call as required by the JMS specification.This attribute is dynamic. It can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.
MBean Attribute (Does not apply to application modules) :
DefaultDeliveryParamsBean.DefaultTimeToLive
Minimum value:
0
Maximum value:
9223372036854775807
Default Redelivery Delay The delay time, in milliseconds, before rolled back or recovered messages are redelivered.
All messages consumed by a consumer created with this factory that have a DefaultRedeliveryDelay of -1 will use this value.
Message consumers can get the redelivery delay explicitly by calling the
weblogic.jms.extensions.WLSession.getRedliveryDelay()
method.This attribute is dynamic. It can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.
MBean Attribute (Does not apply to application modules) :
DefaultDeliveryParamsBean.DefaultRedeliveryDelay
Minimum value:
0
Maximum value:
9223372036854775807
Acknowledge Policy Acknowledge policy for non-transacted sessions that use the
CLIENT_ACKNOWLEDGE
mode.All
indicates that calling acknowledge on a message acknowledges all unacknowledged messages received on the session.Previous
specifies that calling acknowledge on a message acknowledges only unacknowledged messages up to, and including, the given message.This parameter works around a change in the JMS specification and only applies to implementations that use the
CLIENT_ACKNOWLEDGE
acknowledge mode for a non-transacted session. Specifically, the specification allowed users to acknowledge all messages before and including the message being acknowledged. The specification was changed so that acknowledging any message acknowledges all messages ever received (even those received after the message being acknowledge).
ACKNOWLEDGE_PREVIOUS
retains the old behavior (acknowledge all message up to and including the message being acknowledged). Whereas,ACKNOWLEDGE_ALL
yields the new behavior, where all messages received by the given session are acknowledged regardless of which message is being used to effect the acknowledge.This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.
MBean Attribute (Does not apply to application modules) :
ClientParamsBean.AcknowledgePolicy
Allow Close In On Message Specifies whether a connection factory creates message consumers that allow a
close()
orstop()
method to be issued within itsonMessage()
method call.
If selected (set to true) on a custom connection factory, an
onMessage()
method callback is allowed to issue aclose()
method on its own Session, Connection and JMSContext objects, or astop()
call on its own Connection and JMSContext objects. If false, these calls will throw an exception.Default JMS Connection Factories ("java:comp/DefaultJMSConnectionFactory", "weblogic.jms.ConnectionFactory", or "weblogic.jms.XAConnectionFactory") set this option to false and it cannot be modified.
Note: The
onMessage()
method of the Message Listener is allowed to callclose()
on its own MessageConsumer and JMSConsumer even when AllowCloseInOnMessage is set to false.
This value is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.MBean Attribute (Does not apply to application modules) :
ClientParamsBean.AllowCloseInOnMessage
Default Delivery Mode The delivery mode assigned to all messages sent by a producer using this connection factory.
Message producers can get the delivery mode explicitly by calling the javax.jms.MessageProducer.getDeliveryMode() method.
Note: This value is dynamic. It can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.
MBean Attribute:
JMSConnectionFactoryMBean.DefaultDeliveryMode
Default Time To Deliver The number of milliseconds between when a message is produced and when it is made visible on its target destination.
Message producers can get the time-to-deliver explicitly by calling the weblogic.jms.extensions.WLMessageProducer.getTimeToDeliver() method.
Range of Values: Between
0
and a positive 64-bit integer.Note: This value is dynamic. It can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.
MBean Attribute:
JMSConnectionFactoryMBean.DefaultTimeToDeliver
Minimum value:
0
Maximum value:
9223372036854775807
Messages Maximum The maximum number of messages that may exist for an asynchronous session and that have not yet been passed to the message listener. A value of -1 indicates that there is no limit on the number of messages. This value is dynamic. It can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory. (For topic subscribers that use the multicast extension, also see the Overrun Policy field.)
When the number of messages reaches the MessagesMaximum value:
For multicast sessions, new messages are discarded according the policy specified by the OverrunPolicy value and a DataOverrunException is thrown.
For non-multicast sessions, new messages are flow-controlled, or retained on the server until the application can accommodate the messages.
Range of Values: Between -1 and a positive 32-bit integer.
Note: For multicast sessions, when a connection is stopped, messages will continue to be delivered, but only until the MessagesMaximum value is reached. Once this value is reached, messages will be discarded based on the Overrun policy.
MBean Attribute:
JMSConnectionFactoryMBean.MessagesMaximum
Minimum value:
-1
Maximum value:
2147483647
Overrun Policy Overrun policy for topic subscribers that use the multicast extension. The policy to use when the number of outstanding multicast messages reaches the value specified in the Messages Maximum field and some messages must be discarded. Keep New indicates that the most recent messages are given priority over the oldest messages, and the oldest messages are discarded, as needed. Keep Old indicates that the oldest messages are given priority over the most recent messages, and the most recent messages are discarded, as needed. Message age is defined by the order of receipt, not by the JMSTimestamp value.
The policy to use when the number of outstanding multicast messages reaches the value specified in MessagesMaximum and some messages must be discarded.
If set to
Keep New
, the most recent messages are given priority over the oldest messages, and the oldest messages are discarded, as needed.If set to
Keep Old
, the oldest messages are given priority over the most recent messages, and the most recent messages are discarded, as needed.Message age is defined by the order of receipt, not by the JMSTimestamp value.
Note: This value is dynamic. It can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.
MBean Attribute:
JMSConnectionFactoryMBean.OverrunPolicy
Transaction Timeout XA Connection Factory Enabled
![]() |