Sun GlassFish Message Queue 4.4 Administration Guide

ManagedConnectionFactory JavaBean

A managed connection factory defines the connections that the Resource Adapter provides to a message-driven bean. Table 20–2 shows the properties of the ManagedConnectionFactory JavaBean; if set, these properties override the corresponding properties of the ResourceAdapter JavaBean.

Table 20–2 Managed Connection Factory Properties

Property 

Type 

Default Value 

Description 

addressList

String 

Inherited from ResourceAdapter JavaBean (see Table 20–1)

List of message service addresses for connecting to Message Queue service 

userName [Optional]

String 

guest

User name for connecting to Message Queue service 

password

String 

guest

Password for connecting to Message Queue service 

clientID

String 

None 

Client identifier for connections to Message Queue service 

addressListBehavior

String 

PRIORITY

Order in which to attempt connection to Message Queue service:  

    PRIORITY: Order specified in address list


    RANDOM: Random order



Note –

Reconnection attempts after a connection failure start with the broker whose connection failed and proceed sequentially through the address list, regardless of the value set for this property.


addressListIterations

Integer 

1

Number of times to iterate through address list attempting to establish or reestablish a connection 

reconnectEnabled

Boolean 

false

Attempt to reestablish a lost connection?

reconnectAttempts

Integer 

6

Number of times to attempt reconnection to each address in address list before moving on to next 

reconnectInterval

Long integer 

30000

Interval, in milliseconds, between reconnection attempts 

options

String 

None 

A list of additional connection factory properties to be used when creating connections to a Message Queue broker. 

When specified, the value of options must be a comma-separated list of connection factory properties and their values, in the form:


propertyName=value

If value contains a comma or an equals sign, precede the symbol with a backslash (\) or enclose the entire value in quotes; for example:


prop1=comma\,val,prop2="equals=val"

The options property cannot specify properties that are configured internally or that have their own setter methods, specifically: imqReconnectEnabled, imqReconnectAttempts, imqReconnectInterval, imqDefaultUsername, imqDefaultPassword, imqAddressList, imqAddressListIterations. Any values specified in options for these properties are ignored.

useSharedSubscriptionInClusteredContainer

Boolean 

true

Controls whether topic subscriptions created using this ManagedConnectionFactory will be shared when running in a clustered container, as described in About Shared Topic Subscriptions for Clustered Containers.

Set to true (the default) to share subscriptions. The clientID property must also be set, even if the subscription is nondurable.

Set to false to not share subscriptions. This setting should only be used for nondurable subscriptions. The clientID property does not need to be set.