Interface JmsConnectionFactory
-
- All Superinterfaces:
- javax.jms.ConnectionFactory, JmsManagedConnectionFactory, javax.naming.Referenceable, java.io.Serializable
- All Known Subinterfaces:
- JmsQueueConnectionFactory, JmsTopicConnectionFactory
public interface JmsConnectionFactory extends JmsManagedConnectionFactory, javax.resource.Referenceable
Contains provider specific methods relating to the javax.jms.ConnectionFactory interface.
-
-
Method Summary
Methods Modifier and Type Method and Description void
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.void
setClientID(java.lang.String clientID)
Sets the clientID for this ConnectionFactory.void
setConnectionProximity(java.lang.String value)
Set the connection proximity, which specifies the proximity of acceptable messaging engines.void
setConsumerDoesNotModifyPayloadAfterGet(java.lang.String propertyValue)
Sets the property that indicates if the consumer will modify the payload after getting it.void
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.void
setMulticastInterface(java.lang.String multicastInterface)
Determines the network adapter to use for multicast transmissions on a multi-homed system.void
setNonPersistentMapping(java.lang.String nonPersistentMapping)
Define the Reliability that should be used for non persistent messages.void
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.void
setPersistentMapping(java.lang.String persistentMapping)
Define the Reliability that should be used for persistent messages.void
setProducerDoesNotModifyPayloadAfterSet(java.lang.String propertyValue)
Sets the property that indicates if the producer will modify the payload after setting it.void
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>.void
setReadAhead(java.lang.String value)
Set the required value for ReadAhead on all consumers created from this JmsConnectionFactory.void
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.void
setSubscriptionProtocol(java.lang.String protocol)
Used to indicate the protocols that the client will accept for receiving messages.void
setTarget(java.lang.String value)
Set the target, which is the name of a target that resolves to a group of messaging engines.void
setTargetSignificance(java.lang.String value)
Specifies the significance of the target group.void
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.void
setTargetType(java.lang.String value)
Set the target type, specifying the type of information specified in the Target Group property.void
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.void
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.void
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 com.ibm.websphere.sib.api.jms.JmsManagedConnectionFactory
getBusName, getClientID, getConnectionProximity, getConsumerDoesNotModifyPayloadAfterGet, getDurableSubscriptionHome, getMulticastInterface, getNonPersistentMapping, getPersistentMapping, getProducerDoesNotModifyPayloadAfterSet, getProviderEndpoints, getReadAhead, getShareDurableSubscriptions, getSubscriptionProtocol, getTarget, getTargetSignificance, getTargetTransportChain, getTargetType, getTemporaryQueueNamePrefix, getTemporaryTopicNamePrefix, getUserName, isManaged
-
-
-
-
Method Detail
-
setBusName
void setBusName(java.lang.String busName) throws javax.jms.JMSException
Set the name of the messaging bus to which you wish to connect when creating Connections using this ConnectionFactory object.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.
- Parameters:
busName
- The name of the bus to connect to.- Throws:
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
Sets the clientID for this ConnectionFactory.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.
- Parameters:
clientID
- the client ID- Throws:
javax.jms.JMSException
- If the supplied clientID is not valid.- See Also:
JmsManagedConnectionFactory.getClientID()
,Connection.setClientID(String)
-
setNonPersistentMapping
void setNonPersistentMapping(java.lang.String nonPersistentMapping) throws javax.jms.JMSException
Define the Reliability that should be used for non persistent messages.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.
- Parameters:
nonPersistentMapping
- The value required for this property, expressed as one of the constants referenced above.- Throws:
javax.jms.JMSException
- if parameter is not one of the allowed values from ApiJmsConstants- See Also:
JmsManagedConnectionFactory.getNonPersistentMapping()
-
setPersistentMapping
void setPersistentMapping(java.lang.String persistentMapping) throws javax.jms.JMSException
Define the Reliability that should be used for persistent messages.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.
- Parameters:
persistentMapping
- The value required for this property, expressed as one of the constants referenced above.- Throws:
javax.jms.JMSException
- if parameter is not one of the allowed values from ApiJmsConstants- See Also:
JmsManagedConnectionFactory.getPersistentMapping()
-
setUserName
void setUserName(java.lang.String userName) throws javax.jms.JMSException
Sets the default user name that will be used to create Connections from this ConnectionFactory when none is specified by the application or container.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.
- Parameters:
userName
- the default user name- Throws:
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
Sets the default password that will be used to create Connections from this ConnectionFactory when none is specified by the application or container.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.
- Parameters:
password
- the default password- Throws:
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
Set the required value for ReadAhead on all consumers created from this JmsConnectionFactory.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 theJmsDestination.setReadAhead(String)
method.- Parameters:
value
- The required value for ReadAhead on this JmsConnectionFactory- Throws:
javax.jms.JMSException
- If the value specified is not one of the supported constants.- See Also:
ApiJmsConstants.READ_AHEAD_DEFAULT
,ApiJmsConstants.READ_AHEAD_ON
,ApiJmsConstants.READ_AHEAD_OFF
,JmsDestination.setReadAhead(String)
-
setDurableSubscriptionHome
void setDurableSubscriptionHome(java.lang.String home) throws javax.jms.JMSException
Defines the name of the messaging engine used to store messages delivered to durable subscriptions created or used by objects created from this JmsConnectionFactory.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.- Parameters:
home
- The name of the messaging engine which is used to store durable subscriptions created through use of this JmsConnectionFactory.- Throws:
javax.jms.JMSException
- Reserved for later use.
-
setTarget
void setTarget(java.lang.String value) throws javax.jms.JMSException
Set the target, which is the name of a target that resolves to a group of messaging engines.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.
- Parameters:
value
- The required value for targetGroup on this JmsConnectionFactory- Throws:
javax.jms.JMSException
- if the value is badly formed- See Also:
setTargetSignificance(String)
,setTargetType(String)
-
setTargetType
void setTargetType(java.lang.String value) throws javax.jms.JMSException
Set the target type, specifying the type of information specified in the Target Group property.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.- Parameters:
value
- The required value for TargetType on this JmsConnectionFactory- Throws:
javax.jms.JMSException
- if the value is badly formed- See Also:
ApiJmsConstants.TARGET_TYPE_BUSMEMBER
,ApiJmsConstants.TARGET_TYPE_CUSTOM
,ApiJmsConstants.TARGET_TYPE_ME
,setTarget(String)
,setTargetSignificance(String)
-
setTargetSignificance
void setTargetSignificance(java.lang.String value) throws javax.jms.JMSException
Specifies the significance of the target group. The Target Significance values are:- 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.
- Parameters:
value
- The required value for targetSignificance- Throws:
javax.jms.JMSException
- if the value is not accepted.- See Also:
ApiJmsConstants.TARGET_SIGNIFICANCE_REQUIRED
,ApiJmsConstants.TARGET_SIGNIFICANCE_PREFERRED
,setTarget(String)
,setTargetType(String)
-
setTargetTransportChain
void setTargetTransportChain(java.lang.String value) throws javax.jms.JMSException
Set the target transport chain, the name of the transport chain that should be used wjen connecting to a remote messaging engine.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.
- Parameters:
value
- The required value for chain name on this JmsConnectionFactory- Throws:
javax.jms.JMSException
- if the value is badly formed
-
setProviderEndpoints
void setProviderEndpoints(java.lang.String value) throws javax.jms.JMSException
Set the provider endpoints, which are a comma separated list of end point triples of the the form <host>:<port>:<chain>. If the host name is not specified a default of "localhost" will be used.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.
- Parameters:
value
- The provider endpoints to use- Throws:
javax.jms.JMSException
- if the value is badly formed
-
setConnectionProximity
void setConnectionProximity(java.lang.String value) throws javax.jms.JMSException
Set the connection proximity, which specifies the proximity of acceptable messaging engines.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.
- Parameters:
value
- The connection proximity to use- Throws:
javax.jms.JMSException
- if the value is badly formed- See Also:
ApiJmsConstants.CONNECTION_PROXIMITY_BUS
,ApiJmsConstants.CONNECTION_PROXIMITY_HOST
,ApiJmsConstants.CONNECTION_PROXIMITY_SERVER
,ApiJmsConstants.CONNECTION_PROXIMITY_CLUSTER
-
setTemporaryQueueNamePrefix
void setTemporaryQueueNamePrefix(java.lang.String prefix) throws javax.jms.JMSException
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.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.
- Parameters:
prefix
- The temporary queue prefix to be set.- Throws:
javax.jms.JMSException
- if the prefix length limit is breached.
-
setTemporaryTopicNamePrefix
void setTemporaryTopicNamePrefix(java.lang.String prefix) throws javax.jms.JMSException
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.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.
- Parameters:
prefix
- The temporary topic prefix to be set.- Throws:
javax.jms.JMSException
- if the prefix length limit is breached.
-
setShareDurableSubscriptions
void setShareDurableSubscriptions(java.lang.String sharePolicy) throws javax.jms.JMSException
Defines whether durable subscriptions accessed by an application using this ConnectionFactory should be used in an exclusive or shared way.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.
- Parameters:
sharePolicy
- Constant representing the required behaviour.- Throws:
javax.jms.JMSException
- If an unsupported constant is supplied.- See Also:
ApiJmsConstants.SHARED_DSUBS_IN_CLUSTER
,ApiJmsConstants.SHARED_DSUBS_ALWAYS
-
setMulticastInterface
void setMulticastInterface(java.lang.String multicastInterface) throws javax.jms.JMSException
Determines the network adapter to use for multicast transmissions on a multi-homed system. If not set, the default adapter will be used.- Parameters:
multicastInterface
-- Throws:
javax.jms.JMSException
-
setSubscriptionProtocol
void setSubscriptionProtocol(java.lang.String protocol) throws javax.jms.JMSException
Used to indicate the protocols that the client will accept for receiving messages. Only applicable to remote (tcp/ip) connections.- Parameters:
protocol
-- Throws:
javax.jms.JMSException
-
setProducerDoesNotModifyPayloadAfterSet
void setProducerDoesNotModifyPayloadAfterSet(java.lang.String propertyValue) throws javax.jms.JMSException
Sets the property that indicates if the producer will modify the payload after setting it.- Parameters:
propertyValue
- containing the property value.- Throws:
javax.jms.JMSException
- In the event of an invalid value
-
setConsumerDoesNotModifyPayloadAfterGet
void setConsumerDoesNotModifyPayloadAfterGet(java.lang.String propertyValue) throws javax.jms.JMSException
Sets the property that indicates if the consumer will modify the payload after getting it.- Parameters:
propertyValue
- containing the property value.- Throws:
javax.jms.JMSException
- In the event of an invalid value
-
-