com.ibm.websphere.sib.api.jms
Interface JmsConnectionFactory
- public interface JmsConnectionFactory
- extends JmsManagedConnectionFactory, javax.resource.Referenceable
Method Summary
Modifier and Type | Method and Description |
---|---|
|
setBusName(java.lang.String busName)
Set the name of the messaging bus to which you wish to connect when
creating Connections using this ConnectionFactory object.
|
|
setClientID(java.lang.String clientID)
Sets the clientID for this ConnectionFactory.
|
|
setConnectionProximity(java.lang.String value)
Set the connection proximity, which specifies the proximity of
acceptable messaging engines.
|
|
setConsumerDoesNotModifyPayloadAfterGet(java.lang.String propertyValue)
Sets the property that indicates if the consumer will modify the payload after getting it.
|
|
setDurableSubscriptionHome(java.lang.String home)
Defines the name of the messaging engine used to store messages delivered to durable
subscriptions created or used by objects created from this JmsConnectionFactory.
|
|
setMulticastInterface(java.lang.String multicastInterface)
Determines the network adapter to use for multicast transmissions on a
multi-homed system.
|
|
setNonPersistentMapping(java.lang.String nonPersistentMapping)
Define the Reliability that should be used for non persistent messages.
|
|
setPassword(java.lang.String password)
Sets the default password that will be used to create Connections
from this ConnectionFactory when none is specified by the application
or container.
|
|
setPersistentMapping(java.lang.String persistentMapping)
Define the Reliability that should be used for persistent messages.
|
|
setProducerDoesNotModifyPayloadAfterSet(java.lang.String propertyValue)
Sets the property that indicates if the producer will modify the payload after setting it.
|
|
setProviderEndpoints(java.lang.String value)
Set the provider endpoints, which are a comma separated list of end point
triples of the the form <host>:<port>:<chain>.
|
|
setReadAhead(java.lang.String value)
Set the required value for ReadAhead on all consumers created from
this JmsConnectionFactory.
|
|
setShareDurableSubscriptions(java.lang.String sharePolicy)
Defines whether durable subscriptions accessed by an application using this
ConnectionFactory should be used in an exclusive or shared way.
|
|
setSubscriptionProtocol(java.lang.String protocol)
Used to indicate the protocols that the client will accept for receiving messages.
|
|
setTarget(java.lang.String value)
Set the target, which is the name of a target that resolves
to a group of messaging engines.
|
|
setTargetSignificance(java.lang.String value)
Specifies the significance of the target group.
|
|
setTargetTransportChain(java.lang.String value)
Set the target transport chain, the name of the transport chain that should
be used wjen connecting to a remote messaging engine.
|
|
setTargetType(java.lang.String value)
Set the target type, specifying the type of information specified
in the Target Group property.
|
|
setTemporaryQueueNamePrefix(java.lang.String prefix)
Allows the user to supply a prefix of up to twelve characters of text that will
be used as the beginning of the temporary destination name.
|
|
setTemporaryTopicNamePrefix(java.lang.String prefix)
Allows the user to supply a prefix of up to twelve characters of text that will
be used as the beginning of the temporary destination name.
|
|
setUserName(java.lang.String userName)
Sets the default user name that will be used to create Connections
from this ConnectionFactory when none is specified by the application
or container.
|
Methods inherited from interface javax.jms.ConnectionFactory |
---|
createConnection, createConnection |
Methods inherited from interface javax.resource.Referenceable |
---|
setReference |
Methods inherited from interface javax.naming.Referenceable |
---|
getReference |
Method Detail
setBusName
- void setBusName(java.lang.String busName)
- throws javax.jms.JMSException
busName
- The name of the bus to connect to. javax.jms.JMSException
- If the supplied argument is not valid for this property - for example
the busName parameter is null. setClientID
- void setClientID(java.lang.String clientID)
- throws javax.jms.JMSException
The clientID property must be set to a non-null and non-empty value if durable subscriptions will be created or used from Connections created using this ConnectionFactory. Note that it is possible to set the clientID programmatically on the JMS Connection object.
Note the getClientID method is inherited from the JmsManagedConnectionFactory interface.
The default value for this property is null, however his must be changed by the administrator/user if durable subscriptions will be used.
clientID
- the client ID javax.jms.JMSException
- If the supplied clientID is not valid. JmsManagedConnectionFactory.getClientID()
,
Connection.setClientID(String)
setNonPersistentMapping
- void setNonPersistentMapping(java.lang.String nonPersistentMapping)
- throws javax.jms.JMSException
Applications may choose from any of the reliability options for messages sent with a JMS delivery mode of NonPersistent. The meaning of these reliability options can be found in the WAS documentation.
The following constants are accepted as parameters for this method;
-
ApiJmsConstants.MAPPING_AS_SIB_DESTINATION
-
ApiJmsConstants.MAPPING_NONE
-
ApiJmsConstants.MAPPING_BEST_EFFORT_NONPERSISTENT
-
ApiJmsConstants.MAPPING_EXPRESS_NONPERSISTENT
(default) -
ApiJmsConstants.MAPPING_RELIABLE_NONPERSISTENT
-
ApiJmsConstants.MAPPING_RELIABLE_PERSISTENT
-
ApiJmsConstants.MAPPING_ASSURED_PERSISTENT
Notes:
- MAPPING_AS_SIB_DESTINATION is a synonym for MAPPING_NONE, both of which will result in messages being sent with the default quality of service defined on the SIB destination.
- The getNonPersistentMapping method is inherited from the JmsManagedConnectionFactory interface.
nonPersistentMapping
- The value required for this property, expressed as
one of the constants referenced above. javax.jms.JMSException
- if parameter is not one of the allowed values from ApiJmsConstants setPersistentMapping
- void setPersistentMapping(java.lang.String persistentMapping)
- throws javax.jms.JMSException
Applications may choose from any of the reliability values for messages sent with a JMS delivery mode of Persistent. The meaning of these reliability options can be found in the WAS documentation.
The following constants are accepted as parameters for this method;
-
ApiJmsConstants.MAPPING_AS_SIB_DESTINATION
-
ApiJmsConstants.MAPPING_NONE
-
ApiJmsConstants.MAPPING_BEST_EFFORT_NONPERSISTENT
-
ApiJmsConstants.MAPPING_EXPRESS_NONPERSISTENT
-
ApiJmsConstants.MAPPING_RELIABLE_NONPERSISTENT
-
ApiJmsConstants.MAPPING_RELIABLE_PERSISTENT
(default) -
ApiJmsConstants.MAPPING_ASSURED_PERSISTENT
Notes:
- MAPPING_AS_SIB_DESTINATION is a synonym for MAPPING_NONE, both of which will result in messages being sent with the default quality of service defined on the SIB destination.
- The getPersistentMapping method is inherited from the JmsManagedConnectionFactory interface.
persistentMapping
- The value required for this property, expressed as
one of the constants referenced above. javax.jms.JMSException
- if parameter is not one of the allowed values from ApiJmsConstants setUserName
- void setUserName(java.lang.String userName)
- throws javax.jms.JMSException
This property is null by default, but must be altered by the administrator or user if security is turned on, and the user name cannot be inherited from the container.
userName
- the default user name javax.jms.JMSException
- If the user name specified is violates any conditions
(reserved for later use). setPassword
- void setPassword(java.lang.String password)
- throws javax.jms.JMSException
This property is null by default, but must be altered by the administrator or user if security is turned on, and the password cannot be inherited from the container.
password
- the default password javax.jms.JMSException
- If the password specified is violates any conditions
(reserved for later use). setReadAhead
- void setReadAhead(java.lang.String value)
- throws javax.jms.JMSException
The ReadAhead property defines whether messages may be pre-emptively
streamed to remote client consumers of messages for the benefit of
performance.
Messages which are streamed to a consumer are locked on the server and
may not be consumed by any other consumers of that destination.
Messages which are streamed to the consumer but not consumed before the
consumer is closed are subsequently unlocked on the server and
available for receipt by other consumers.
Permitted values for the ReadAhead property of a JmsConnectionFactory are
as follows;
-
ApiJmsConstants.READ_AHEAD_DEFAULT
- The default (recommended) behaviour will be used. Follow this link for details on what this means. (this is the default for this property). -
ApiJmsConstants.READ_AHEAD_ON
- All consumers created through use of this JmsConnectionFactory will have ReadAhead turned on. -
ApiJmsConstants.READ_AHEAD_OFF
- All consumers created through use of this JmsConnectionFactory will have ReadAhead turned off.
Note that the value specified here may be overridden on a per Destination basis by use of the
JmsDestination.setReadAhead(String)
method.
value
- The required value for ReadAhead on this JmsConnectionFactory javax.jms.JMSException
- If the value specified is not one of the supported constants. setDurableSubscriptionHome
- void setDurableSubscriptionHome( java.lang.String home)
- throws javax.jms.JMSException
Note that applications wishing to connect to a particular durable subscription
must specify the same value for this property as was used when the
durable subscription was created.
This property must be specified on the ConnectionFactory before the Connection
is created. Failure to do so will cause a javax.jms.IllegalStateException to be
thrown by Session.createDurableSubscriber.
The default value for this property is null, but this default does not allow
applications to use durable subscriptions for the reasons described above.
home
- The name of the messaging engine which is used to store
durable subscriptions created through use of this JmsConnectionFactory. javax.jms.JMSException
- Reserved for later use. setTarget
- void setTarget(java.lang.String value)
- throws javax.jms.JMSException
The target is a bus member, custom user cluster or a messaging engine name.
There is no default value for this property, which may be null.
value
- The required value for targetGroup on this JmsConnectionFactory javax.jms.JMSException
- if the value is badly formed setTargetType
- void setTargetType(java.lang.String value)
- throws javax.jms.JMSException
Permitted values for the targetType property of a JmsConnectionFactory are as follows;
-
ApiJmsConstants.TARGET_TYPE_BUSMEMBER
- The default behaviour will be used. A messaging engine will be selected that is a member of the named bus member group. -
ApiJmsConstants.TARGET_TYPE_CUSTOM
- A messaging engine in the required user specified custom group will be selected. -
ApiJmsConstants.TARGET_TYPE_ME
- When this constant is specified the Target Group must be a messaging engine name.
The default for this property is TARGET_TYPE_BUSMEMBER.
value
- The required value for TargetType on this JmsConnectionFactory javax.jms.JMSException
- if the value is badly formed setTargetSignificance
- void setTargetSignificance(java.lang.String value)
- throws javax.jms.JMSException
- Required - it is required that the selected messaging engine be in the Target Group
- Preferred - it is preferred that the selected messaging engine be in the Target Group.
value
- The required value for targetSignificance javax.jms.JMSException
- if the value is not accepted. setTargetTransportChain
- void setTargetTransportChain(java.lang.String value)
- throws javax.jms.JMSException
This is not the chain name specification string, but a short name that represents a particular chain.
A null value is allowed, and results in the default value being used.
value
- The required value for chain name on this JmsConnectionFactory javax.jms.JMSException
- if the value is badly formed setProviderEndpoints
- void setProviderEndpoints(java.lang.String value)
- throws javax.jms.JMSException
If the port number is not specified then 7276 will be used as a default value.
If the chain name is not specified for a triplet it will be defaulted to a predefined chain, eg "tcp/jfap".
The default value for this property is null.
value
- The provider endpoints to use javax.jms.JMSException
- if the value is badly formed setConnectionProximity
- void setConnectionProximity(java.lang.String value)
- throws javax.jms.JMSException
Only messaging engines which fall into the acceptable proximity will be considered as candidate messaging engines for attachment of the client.
Permitted values for the ConnectionProximity property of a JmsConnectionFactory are as follows;
-
ApiJmsConstants.CONNECTION_PROXIMITY_SERVER
- Only messaging engines in the same server are acceptable. -
ApiJmsConstants.CONNECTION_PROXIMITY_HOST
- Only messaging engines in the same host are acceptable. -
ApiJmsConstants.CONNECTION_PROXIMITY_CLUSTER
- Only messaging engines in the same cluster are acceptable. -
ApiJmsConstants.CONNECTION_PROXIMITY_BUS
- All messaging eninges in the Bus are acceptable. This is the default value.
value
- The connection proximity to use javax.jms.JMSException
- if the value is badly formed setTemporaryQueueNamePrefix
- void setTemporaryQueueNamePrefix( java.lang.String prefix)
- throws javax.jms.JMSException
There is a 12 character limit on the length of the prefix, which will result in a JMSException being thrown if this length is exceeded.
The default for this property is null, which will result in no prefix being applied to temporary queue names.
prefix
- The temporary queue prefix to be set. javax.jms.JMSException
- if the prefix length limit is breached. setTemporaryTopicNamePrefix
- void setTemporaryTopicNamePrefix( java.lang.String prefix)
- throws javax.jms.JMSException
There is a 12 character limit on the length of the prefix, which will result in a JMSException being thrown if this length is exceeded.
The default for this property is null, which will result in no prefix being applied to temporary topic names.
prefix
- The temporary topic prefix to be set. javax.jms.JMSException
- if the prefix length limit is breached. setShareDurableSubscriptions
- void setShareDurableSubscriptions( java.lang.String sharePolicy)
- throws javax.jms.JMSException
The default for this value is ApiJmsConstants.SHARED_DSUBS_IN_CLUSTER
which provides sensible behaviour in cloned and non-cloned application servers
and J2EE AppClient environments as described on the property description.
The valid options for this property are as follows - more details can found by clicking on each option.
-
ApiJmsConstants.SHARED_DSUBS_IN_CLUSTER
- The default value. The decision is made autonomically. -
ApiJmsConstants.SHARED_DSUBS_ALWAYS
- Durable subscriptions are always shared. -
ApiJmsConstants.SHARED_DSUBS_NEVER
- Durable subscriptions are never shared.
sharePolicy
- Constant representing the required behaviour. javax.jms.JMSException
- If an unsupported constant is supplied. setMulticastInterface
- void setMulticastInterface(java.lang.String multicastInterface)
- throws javax.jms.JMSException
multicastInterface
- javax.jms.JMSException
setSubscriptionProtocol
- void setSubscriptionProtocol(java.lang.String protocol)
- throws javax.jms.JMSException
protocol
- javax.jms.JMSException
setProducerDoesNotModifyPayloadAfterSet
- void setProducerDoesNotModifyPayloadAfterSet( java.lang.String propertyValue)
- throws javax.jms.JMSException
propertyValue
- containing the property value. javax.jms.JMSException
- In the event of an invalid value setConsumerDoesNotModifyPayloadAfterGet
- void setConsumerDoesNotModifyPayloadAfterGet( java.lang.String propertyValue)
- throws javax.jms.JMSException
propertyValue
- containing the property value. javax.jms.JMSException
- In the event of an invalid value
The default value for this property is null, however this must be altered by the administrator/user to define the actual bus name. It will not be possible to create a connection with this property at its default value.