Class MQConnectionFactory
- All Implemented Interfaces:
JmsConnectionFactory, JmsPropertyContext, JmsReadablePropertyContext, com.ibm.msg.client.jakarta.provider.ProviderPropertyContextCallback, jakarta.jms.ConnectionFactory, Serializable, Map<String,Object>, Referenceable
- Direct Known Subclasses:
Cleanup, MQQueueConnectionFactory, MQTopicConnectionFactory, MQXAConnectionFactory
If the application passes an empty string or a null value for the User ID when creating a connection, then the User ID that started either the JVM or the application server will be sent to the queue manager for authentication.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThis enumeration represents all the Administrative Properties of MQConnectionFactory objects. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe system property for the key file must be supplied -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.jms.ConnectionCreates a connection with the default user identity.jakarta.jms.ConnectioncreateConnection(String userID, String password) Creates a connection with the specified user identity.Gets the application name for the connection factoryintGets type of the Balancing Application when using uniform clusters and application patternsintGets the exception types that will be passed to the user's asynchronous exception listenerintGets the balancing application type when using uniform clusters and application patterns in J2SE,intGets the options set for application balancing when using uniform clusters and application patternsintGets the timeout value set for application balancing when using uniform clusters and application patternsGets the broker's queue name for non-durable connection consumers.Gets the broker's control queue name.Gets the broker's publish queue name.Gets the name of the broker's queue manager.Gets the broker's queue name for subscribers.intGets the version number of the broker.intGet the level of validation to be performed for HTTPS certificate validation during CCDT retrievalGets the SSLSocketFactory used with SSL encryption for CCDT HTTPS endpointGets the URL for the client channel definition table.intgetCCSID()Gets the character set of the queue manager.intGet the certificate validation policy setting for this connection.Gets the name of the channel that was used.longGets the clean up interval.intGets the clean up level.Deprecated.Gets the client ID.Gets the client ID.intGet the client reconnection optionsintGet the amount of time, in seconds, that a client connection will attempt to reconnect.Get the hosts to which the client will attempt to connect tobyte[]Gets the value of the queue manager connection tag.Gets the description.intDeprecated.intIndicates the default behavior of applications accessing a quiescing queue manager.static FilegetFileFromURL(String keyFileUri) Extracts a file object out of provided Key file URIGets the list of header compression techniques which has been set.Gets the name of the host.Gets the local address.booleanAllows compatibility style to be used for map message element names.intGets the maximum buffer size.intIndicates what happens to unwanted messages.intIndicates whether the client or the broker performs message selection.intGets the connection options.intGets the message batch size.Collection<? extends Object> Gets the list of message compression techniques that have been set.intDeprecated.intDeprecated.intgetPort()Gets the port number.Deprecated.Deprecated.intGets the port number of the proxy server.intGets the number of messages that can be published before requiring acknowledgement from the broker.Gets the name of the queue manager.Gets the description of the receive exit.Gets the initialization string for the receive exit.Deprecated.intGets the interval between browse scans of a queue.Gets the description of the security exit.Gets the initialization string for the security exit.intGets the interval between send calls to check for errors on asynchronous put.Gets the description of the send exit.Gets the initialization string for the send exit.intGets a value indicating whether client connections are sharing their socket (conversation)booleanGets the sparse subscriptions attribute.Collection<? extends Object> Gets the collection of CertStore objects.Gets the collection of CertStore objects as a String.Gets the CipherSuite used for SSL encryption.booleanIndicates whether sslFips (FIPS) is required.Gets the distinguished name pattern used to validate the queue manager.intGets the SSL reset count.Gets the SSLSocketFactory used with SSL encryption.intGets the status refresh interval.intGets the SUBSTORE property.booleanIndicates how syncpoint is used for GET operations.booleanis target client matching enabled.Gets the name of a model queue for creating temporary destinations.Gets the prefix used to form the name of an IBM MQ dynamic queue.Gets the prefix to use when creating temporary topic names.intGet the level of validation to be performed for HTTPS certificate validation during Token retrievalGet the SSLSocketFactory used with SSL encryption for JWT https endpointintGets the transport type.booleanDeprecated.as noted insetUseConnectionPooling(boolean usePooling)this property has no effect in the current releaseintGets the version number.intGets the formatting accepted when using wildcards.voidsetAppName(String name) Set the application name on the connection factoryvoidsetAsyncExceptions(int flags) Sets the exception types that should be passed to the user's exception listener.voidsetBalancingApplicationType(int balType) Sets the balancing application type when using uniform clusters and application patterns in J2SE,voidsetBalancingOptions(int options) Set options for application balancingvoidsetBalancingTimeout(int time) Set timeout for application balancingvoidsetBrokerCCSubQueue(String queueName) Sets the name of the broker nondurable connection consumer subscriber queue.voidsetBrokerControlQueue(String queueName) Sets the name of the broker control queue.voidsetBrokerPubQueue(String queueName) Sets the name of the broker's publish queue.voidsetBrokerQueueManager(String queueManagerName) Sets the name of the broker's queue manager.voidsetBrokerSubQueue(String queueName) Sets the name of the broker nondurable subscriber queue.voidsetBrokerVersion(int version) Sets the version of the broker.voidsetCCDTHttpsCertValidationPolicy(int ccdtHttpsCertValidation) Set the level of validation to be performed for HTTPS certificate validation during CCDT retrievalvoidSets the SSLSocketFactory for use with SSL encryption specifically for retrieving CCDT file from https endpoint.voidsetCCDTURL(URL url) Sets the URL for the client channel definition table.voidsetCCSID(int ccsid) Sets the character set used within the initial data flow when connecting to the queue manager.voidsetCertificateValPolicy(int policy) Sets the certificate validation policyvoidsetChannel(String channelName) Sets the name of the channel - applies to client transport mode only.voidsetCleanupInterval(long interval) Sets the clean up interval.voidsetCleanupLevel(int level) Sets the clean up level.voidsetClientId(String id) Deprecated.Sets the client ID.voidsetClientID(String id) Sets the client ID.voidsetClientReconnectOptions(int options) Specifies the client reconnect options for new connections created by this factory.voidsetClientReconnectTimeout(int timeout) Set the amount of time, in seconds, that a client connection will attempt to reconnect.voidsetConnectionNameList(String hosts) Specifies the hosts to which the client will attempt to reconnect to after its connection is broken.voidsetConnTag(byte[] cTag) Sets the value of the queue manager connection tag.voidsetDescription(String desc) Sets the description.voidsetDirectAuth(int authority) Deprecated.voidsetFailIfQuiesce(int fiq) Sets the default behavior of applications accessing a quiescing queue manager.voidsetHdrCompList(Collection<?> compList) Sets the list of header compression techniques.voidsetHostName(String hostname) Sets the name of the host.voidsetLocalAddress(String address) Sets the local address.voidsetMapNameStyle(boolean style) Allows compatibility style to be used for map message element names.voidsetMaxBufferSize(int size) Sets the maximum buffer size.voidsetMessageRetention(int mRet) Sets what happens to unwanted messages.voidsetMessageSelection(int selection) Sets whether the client or the broker performs message selection.voidsetMQConnectionOptions(int cTagOpt) Sets the connection options for a queue manager.voidsetMsgBatchSize(int size) Sets the message batch size.voidsetMsgCompList(Collection<?> compList) Sets the list of message compression techniques.voidsetMulticast(int multicast) Deprecated.voidsetPollingInterval(int interval) Deprecated.voidsetPort(int port) Sets the port for a client connection.voidsetProviderVersion(String version) Deprecated.voidsetProxyHostName(String hostName) Deprecated.voidsetProxyPort(int proxyPort) Deprecated.voidsetPubAckInterval(int interval) Sets the number of messages that can be published before requiring acknowledgement from the broker.voidsetQueueManager(String queueManagerName) Sets the name of the queue manager.voidsetReceiveExit(String receiveExit) Sets the receive exit.voidsetReceiveExitInit(String data) Sets the initialization string for the receive exit.voidsetRescanInterval(int interval) Deprecated.voidsetSecurityExit(String securityExit) Sets the security exit.voidsetSecurityExitInit(String data) Sets the initialization string for the security exit.voidsetSendCheckCount(int interval) Sets the interval between send calls to check for errors on asynchronous put.voidsetSendExit(String sendExit) Sets the send exit.voidsetSendExitInit(String data) Gets the description of the send exit.voidsetShareConvAllowed(int shared) Sets whether client connections can share their socket (conversation)voidsetSparseSubscriptions(boolean sparse) Sets whether sparse subscriptions are selected.voidsetSSLCertStores(String stores) Specifies a list of LDAP servers used for certificate revocation list (CRL) checking.voidsetSSLCertStores(Collection<?> stores) Provides a collection of CertStore objects used for certificate revocation list (CRL) checking.voidsetSSLCipherSuite(String cipherSuite) Sets the CipherSuite used for SSL encryption.voidsetSSLFipsRequired(boolean required) Sets whether sslFips (FIPS) is required.voidsetSSLPeerName(String peerName) Sets a distinguished name (DN) pattern.voidsetSSLResetCount(int bytes) Sets the SSL reset count.voidSets the SSLSocketFactory for use with SSL encryption.voidsetStatusRefreshInterval(int interval) Sets the status refresh interval.voidsetSubscriptionStore(int flag) Sets the SUBSTORE property.voidsetSyncpointAllGets(boolean flag) Chooses whether to do all GET operations within a syncpoint.voidsetTargetClientMatching(boolean matchClient) Enables or disables target client matching.voidsetTemporaryModel(String queueName) Sets the name of an IBM MQ model queue used when creating JMS temporary destinations.voidsetTempQPrefix(String newTempQPrefix) Sets the prefix to be used to form the name of an IBM MQ dynamic queue.voidsetTempTopicPrefix(String prefix) Sets the prefix to use when creating temporary topic names.voidsetTokenClientId(String clientId) Sets the JWT Client IDvoidsetTokenClientSecret(String clientSecret) voidsetTokenEndpoint(URL tokenEndpoint) Sets the Token endpointvoidsetTokenHttpsCertValidationPolicy(int tokenHttpsCertValidation) Set the level of validation to be performed for HTTPS certificate validation during Token retrievalvoidSet the SSLSocketFactory for use with SSL encryption specifically for retrieving JWT for token based authentication from https endpoint.voidsetTransportType(int type) Sets the transport type.voidsetUseConnectionPooling(boolean usePooling) Deprecated.JMS does not use connection pooling anymore.voidsetUserAuthenticationMQCSP(boolean bVal) voidsetWildcardFormat(int format) Sets the formatting to accept when using wildcards.Methods inherited from class com.ibm.msg.client.jakarta.jms.admin.JmsConnectionFactoryImpl
createContext, createContext, createContext, createContext, equals, hashCodeMethods inherited from class com.ibm.msg.client.jakarta.jms.internal.JmsPropertyContextImpl
clear, containsKey, containsValue, entrySet, get, getObjectProperty, isEmpty, keySet, propertyExists, put, putAll, remove, setBatchProperties, setBooleanProperty, setByteProperty, setBytesProperty, setCharProperty, setDoubleProperty, setFloatProperty, setIntProperty, setLongProperty, setObjectProperty, setProviderPropertyContext, setShortProperty, setStringProperty, size, valuesMethods inherited from class com.ibm.msg.client.jakarta.jms.internal.JmsReadablePropertyContextImpl
dump, getBooleanProperty, getByteProperty, getBytesProperty, getCharProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getPropertyNames, getShortProperty, getStringProperty, propertyAppExists, toStringMethods inherited from interface JmsPropertyContext
setBatchProperties, setBooleanProperty, setByteProperty, setBytesProperty, setCharProperty, setDoubleProperty, setFloatProperty, setIntProperty, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, toJsonMethods inherited from interface JmsReadablePropertyContext
getBooleanProperty, getByteProperty, getBytesProperty, getCharProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, stringifyMeMethods inherited from interface Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Field Details
-
MQ_JMSADMIN_KEYFILE
The system property for the key file must be supplied- See Also:
-
-
Constructor Details
-
MQConnectionFactory
public MQConnectionFactory()Default constructor.
-
-
Method Details
-
getBrokerCCSubQueue
Gets the broker's queue name for non-durable connection consumers.- Returns:
- the name of the queue
- Throws:
jakarta.jms.JMSException- if the connection factory instance is of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to String type.
-
getBrokerControlQueue
Gets the broker's control queue name.- Returns:
- the name of the control queue.
- Throws:
jakarta.jms.JMSException- if the connection factory is of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to String type.
-
getBrokerPubQueue
Gets the broker's publish queue name.- Returns:
- the name of the queue.
- Throws:
jakarta.jms.JMSException- if the connection factory is of type of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to String type
-
getBrokerQueueManager
Gets the name of the broker's queue manager.- Returns:
- the name of the queue manager.
- Throws:
jakarta.jms.JMSException- if the connection factory is of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to String type.
-
getBrokerSubQueue
Gets the broker's queue name for subscribers.- Returns:
- the name of the queue.
- Throws:
jakarta.jms.JMSException- if the connection factory is of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to String type
-
getBrokerVersion
public int getBrokerVersion() throws jakarta.jms.JMSExceptionGets the version number of the broker.- Returns:
- the version number.
- Throws:
jakarta.jms.JMSException- if the connection factory is of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to Integer type
-
getCertificateValPolicy
public int getCertificateValPolicy() throws jakarta.jms.JMSExceptionGet the certificate validation policy setting for this connection.- Returns:
- the certificate validation policy setting.
- Throws:
jakarta.jms.JMSException- if the value of the property is null.
-
getCCDTURL
Gets the URL for the client channel definition table.- Returns:
- the address of the client channel definition table.
-
getCCDTSSLSocketFactory
Gets the SSLSocketFactory used with SSL encryption for CCDT HTTPS endpoint- Returns:
- the SSLSocketFactory.
-
getCCSID
public int getCCSID()Gets the character set of the queue manager.- Returns:
- the CCSID.
-
getChannel
Gets the name of the channel that was used.- Returns:
- the name of the channel.
-
getCleanupInterval
public long getCleanupInterval() throws jakarta.jms.JMSExceptionGets the clean up interval.- Returns:
- the clean up interval (milliseconds).
- Throws:
jakarta.jms.JMSException- if the connection factory instance is of type MQConnectionFactory or if the value of the property is null or if the value can not be converted to long type.
-
getCleanupLevel
public int getCleanupLevel() throws jakarta.jms.JMSExceptionGets the clean up level.- Returns:
- the clean up level.
- Throws:
jakarta.jms.JMSException- if the connection factory instance is of type MQConnectionFactory or if the value of the property is null or if the value can not be converted to Integer type.
-
getClientID
Gets the client ID.- Returns:
- the client ID for all connections made using this factory.
Note that this method always throws an IllegalStateException when you make a direct connection to a broker.
-
getClientId
Deprecated.Gets the client ID.- Returns:
- the client ID for all connections made using this factory.
Note that this method always throws an IllegalStateException when you make a direct connection to a broker.
-
getConnTag
public byte[] getConnTag()Gets the value of the queue manager connection tag. It is used by the queue manager to serialize access to the affected resources. This tag is only used when connecting to a z/OS queue manager. On other platforms it will have a value corresponding to MQCT_NONE - its default value.- Returns:
- the String value of the queue manager connection tag.
-
getDescription
-
getDirectAuth
public int getDirectAuth() throws jakarta.jms.JMSExceptionDeprecated.This method was deprecated in a previous version and is no longer supported.- Returns:
- the appropriate constant value
- Throws:
jakarta.jms.JMSException- if the connection factory instance is of type MQConnectionFactory or if the value of the property is null or if the value can not be converted to Integer type.
-
getFailIfQuiesce
public int getFailIfQuiesce()Indicates the default behavior of applications accessing a quiescing queue manager.- Returns:
- possible values are:
-
getHdrCompList
Gets the list of header compression techniques which has been set.- Returns:
- The collection that holds the header compression techniques. If not set, this collection has a value of null
-
getHostName
Gets the name of the host. This only applies for client connections or direct TCP/IP connections to IBM MQ.- Returns:
- the name of the host.
-
getLocalAddress
-
getMapNameStyle
public boolean getMapNameStyle()Allows compatibility style to be used for map message element names.- Returns:
- possible values are:
-
getMaxBufferSize
public int getMaxBufferSize() throws jakarta.jms.JMSExceptionGets the maximum buffer size. This is the maximum number of received messages that can be stored in an internal message buffer while waiting to be processed by the client application. This property applies only when TRANSPORT has the values DIRECT or DIRECTHTTP.- Returns:
- the maximum buffer size.
- Throws:
jakarta.jms.JMSException- if the connection factory instance is of type MQConnectionFactory or if the value of the property is null or if the value can not be converted to Integer type.
-
getMessageRetention
public int getMessageRetention() throws jakarta.jms.JMSExceptionIndicates what happens to unwanted messages.- Returns:
- possible values are:
- Throws:
jakarta.jms.JMSException- if the connection factory instance is of type MQTopicConnectionFactory or if the value of the property is null or if the value can not be converted to Integer type.
-
getMessageSelection
public int getMessageSelection() throws jakarta.jms.JMSExceptionIndicates whether the client or the broker performs message selection.- Returns:
- possible values are:
- Throws:
jakarta.jms.JMSException- if the connection factory instance is of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to Integer type
-
getMQConnectionOptions
public int getMQConnectionOptions()Gets the connection options.- Returns:
- the connection options set for the queue manager
-
getMsgBatchSize
public int getMsgBatchSize()Gets the message batch size.- Returns:
- the maximum number of messages to be taken at once when using asynchronous delivery.
-
getMsgCompList
Gets the list of message compression techniques that have been set.- Returns:
- the collection holding the message compression techniques. If not set, this collection has a value of null
-
getMulticast
public int getMulticast() throws jakarta.jms.JMSExceptionDeprecated.This method was deprecated in a previous version and is no longer supported.- Returns:
- The appropriate constant value
- Throws:
jakarta.jms.JMSException- if the connection factory instance is of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to Integer type.
-
getPollingInterval
public int getPollingInterval()Deprecated.Gets the interval between scans of all receivers during asynchronous message delivery.- Returns:
- the interval in milliseconds.
-
getPort
public int getPort()Gets the port number. Applies to client connections or direct TCP/IP connection to a broker.- Returns:
- the port number.
-
getProviderVersion
Deprecated.Gets the provider version that should be used when creating connections.- Returns:
- value of the form V.R.M.F or abbreviated forms such as V or V.R, where V, R, M and F are integers representing the version, release, modification level and fixpack. Alternatively, the String value can be set to unspecified.
- Throws:
jakarta.jms.JMSException- if the value of the property is null or if the value can not be converted to String type.
-
getProxyHostName
Deprecated.Gets the proxy host name. This property is no longer supported- Returns:
- the host name of the proxy server when establishing a real-time connection, or null if no proxy server is used.
- Throws:
jakarta.jms.JMSException- if the connection factory instance if of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to String type.
-
getProxyPort
public int getProxyPort() throws jakarta.jms.JMSExceptionGets the port number of the proxy server.- Returns:
- the port number of the proxy server.
- Throws:
jakarta.jms.JMSException- if the connection factory instance if of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to Integer type
-
getPubAckInterval
public int getPubAckInterval() throws jakarta.jms.JMSExceptionGets the number of messages that can be published before requiring acknowledgement from the broker.- Returns:
- the acknowledgement interval.
- Throws:
jakarta.jms.JMSException- if the connection factory instance if of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to Integer type.
-
getQueueManager
-
getReceiveExit
Gets the description of the receive exit.- Returns:
- either the name of the class or a String in the form library(entryPoint) where 'library' is the name of the module where the code resides and 'entryPoint' is the entry point.
-
getReceiveExitInit
Gets the initialization string for the receive exit.- Returns:
- the initialization string.
-
getReference
Deprecated.Creates a reference for this queue connection factory. Implemented for thejavax.naming.Referenceinterface.- Specified by:
getReferencein interfaceReferenceable- Overrides:
getReferencein classcom.ibm.msg.client.jakarta.jms.admin.JmsJndiConnectionFactoryImpl- Returns:
- the new Reference object.
- Throws:
NamingException- if there is a naming problem.
-
getRescanInterval
public int getRescanInterval()Gets the interval between browse scans of a queue. The scan looks for messages that have not been returned by the previous browse scan.- Returns:
- the interval in milliseconds.
-
getSecurityExit
Gets the description of the security exit.- Returns:
- either the name of the class or a String in the form library(entryPoint) where 'library' is the name of the module where the code resides and 'entryPoint' is the entry point.
-
getSecurityExitInit
Gets the initialization string for the security exit.- Returns:
- the initialization string.
-
getSendCheckCount
public int getSendCheckCount() throws jakarta.jms.JMSExceptionGets the interval between send calls to check for errors on asynchronous put.- Returns:
- value to indicate the interval between send calls to check for asynchronous put errors, measured as a count of message sends within a single non-transacted JMS Session.
- Throws:
jakarta.jms.JMSException- if the value of the property is null or if the value can not be converted to Integer type.
-
getSendExit
Gets the description of the send exit.- Returns:
- either the name of the class or a String in the form library(entryPoint) where 'library' is the name of the module where the code resides and 'entryPoint' is the entry point.
-
getSendExitInit
Gets the initialization string for the send exit.- Returns:
- the initialization string.
-
getSparseSubscriptions
public boolean getSparseSubscriptions() throws jakarta.jms.JMSExceptionGets the sparse subscriptions attribute. A sparse subscription is one that receives infrequent matching messages. If the attribute is true the application must be able to open the consumer queue for browsing messages.- Returns:
- true if sparse subscriptions are selected.
- Throws:
jakarta.jms.JMSException- if the connection factory is of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to boolean type.
-
getSSLCertStores
Gets the collection of CertStore objects.- Returns:
- the list of CertStore objects as a Collection. This works whether
setSSLCertStores(Collection)was used to set a collection of CertStore objects or a String specifying such a list. - Throws:
jakarta.jms.JMSException- if an unsupported type or bad value is encountered.
-
getSSLCertStoresAsString
Gets the collection of CertStore objects as a String.- Returns:
- the list of CertStore objects representing the LDAP CRLs as a String if
setSSLCertStores(String)set it as a String in the first place. - Throws:
jakarta.jms.JMSException- if the certificate store is null or if a collection of certificate stores was set on the connection factory.
-
getSSLCipherSuite
Gets the CipherSuite used for SSL encryption.- Returns:
- the CipherSuite String.
-
getSSLFipsRequired
public boolean getSSLFipsRequired()Indicates whether sslFips (FIPS) is required.- Returns:
- the value.
-
getSSLPeerName
Gets the distinguished name pattern used to validate the queue manager.- Returns:
- the distinguished name pattern.
-
getSSLResetCount
public int getSSLResetCount()Gets the SSL reset count.- Returns:
- the reset count.
-
getSSLSocketFactory
Gets the SSLSocketFactory used with SSL encryption.- Returns:
- the SSLSocketFactory.
-
getStatusRefreshInterval
public int getStatusRefreshInterval() throws jakarta.jms.JMSExceptionGets the status refresh interval.- Returns:
- the time between transactions to refresh publish/subscribe status (milliseconds).
- Throws:
jakarta.jms.JMSException- if the connection factory is of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to Integer type
-
getSubscriptionStore
public int getSubscriptionStore() throws jakarta.jms.JMSExceptionGets the SUBSTORE property.- Returns:
- an integer which represents a valid values of the SUBSTORE property:
- Throws:
jakarta.jms.JMSException- if the connection factory is of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to Integer type.
-
getSyncpointAllGets
public boolean getSyncpointAllGets()Indicates how syncpoint is used for GET operations.- Returns:
- true if all message GET operations are done under syncpoint. Otherwise GET operations for non-transacted sessions using jakarta.jms.ProviderSession.AUTO_ACKNOWLEDGE or jakarta.jms.ProviderSession.DUPS_OK_ACKNOWLEDGE acknowledge modes can do GETs outside syncpoint.
-
getTargetClientMatching
public boolean getTargetClientMatching()is target client matching enabled.- Returns:
- whether target client matching is enabled.
- See Also:
-
getTemporaryModel
Gets the name of a model queue for creating temporary destinations.- Returns:
- the name of the model queue. If it refers to a permanent dynamic model queue then you
must call the
MQTemporaryQueue.delete()method to destroy the queue after use.Within the WebSphere Application Server,
MQTemporaryQueue.delete()will be called by the application server when a connection is being closed. Therefore even if a permanent dynamic model queue is used, the created temporary queue will be destroyed. - Throws:
jakarta.jms.JMSException- if the connection factory is of type MQTopicConnectionFactory or if the value of the property is null or if the value can not be converted to String type
-
getTempTopicPrefix
Gets the prefix to use when creating temporary topic names.- Returns:
- String property applicable to all instances of ConnectionFactory, TopicConnectionFactory and their XA equivalents. When creating temporary topics, JMS will generate a topic string of the form TEMP/prefix/<unique id>, or if this property is left with the default value, just TEMP/<unique id>.
- Throws:
jakarta.jms.JMSException- if the connection factory is of type MQQueueConnectionFactory or if the value of the property is null or if the value can not be converted to String type.
-
getTempQPrefix
Gets the prefix used to form the name of an IBM MQ dynamic queue.- Returns:
- the prefix.
- Throws:
jakarta.jms.JMSException- if the connection factory is of type MQTopicConnectionFactory or if the value of the property is null or if the value can not be converted to String type
-
getTransportType
public int getTransportType()Gets the transport type.- Returns:
- the transport type. Valid types are: DirectIP transport types can still be set but are no longer supported, so will throw an Exception when trying to create a Connection
-
getUseConnectionPooling
public boolean getUseConnectionPooling()Deprecated.as noted insetUseConnectionPooling(boolean usePooling)this property has no effect in the current releaseIndicates whether the useConnectionPooling property has been set.- Returns:
- true means that useConnectionPooling property has been set for this object.
- See Also:
-
getVersion
public int getVersion()Gets the version number.- Returns:
- the version number of the class.
-
getWildcardFormat
public int getWildcardFormat() throws jakarta.jms.JMSExceptionGets the formatting accepted when using wildcards.- Returns:
- property applicable to all instances of ConnectionFactory, TopicConnectionFactory and their XA equivalents. In the v6 implementation, where publish/subscribe messaging is performed via a broker, different topic wildcard syntax is used depending on which broker is used. In v7, using native publish/subscribe within the queue manager, the wildcard syntax can be chosen via this property.
- Throws:
jakarta.jms.JMSException- if the value of the property is null or if the value can not be converted to Integer type.
-
getBalancingApplicationType
public int getBalancingApplicationType() throws jakarta.jms.JMSExceptionGets the balancing application type when using uniform clusters and application patterns in J2SE,- Returns:
- property applicable to instances of ConnectionFactory and their XA equivalents. The
return value may be one of :
- WMQ_BALANCING_APPLICATION_TYPE_SIMPLE
- WMQ_BALANCING_APPLICATION_TYPE_REQUEST_REPLY
- WMQ_BALANCING_APPLICATION_TYPE_MANAGED (should not be used by J2EE applications)
- Throws:
jakarta.jms.JMSException- if the value of the property is null or if the value can not be converted to Integer type.
-
getAppName
Gets the application name for the connection factory- Returns:
- the application name set on the connection factory
-
getAsyncExceptions
public int getAsyncExceptions()Gets the exception types that will be passed to the user's asynchronous exception listener- Returns:
- the ASYNC_EXCEPTIONS_* bitwise flags
-
getAppType
public int getAppType() throws jakarta.jms.JMSExceptionGets type of the Balancing Application when using uniform clusters and application patterns- Returns:
- property applicable to instances of ConnectionFactory and their XA equivalents. The
return value may be one of :
- WMQ_BALANCING_APPLICATION_TYPE_SIMPLE
- WMQ_BALANCING_APPLICATION_TYPE_REQUEST_REPLY
- WMQ_BALANCING_APPLICATION_TYPE_MANAGED (should not be used by J2EE applications)
- Throws:
jakarta.jms.JMSException- if the value of the property is null or if the value can not be converted to Integer type.
-
getBalancingTimeout
public int getBalancingTimeout() throws jakarta.jms.JMSExceptionGets the timeout value set for application balancing when using uniform clusters and application patterns- Returns:
- the timeout
- Throws:
jakarta.jms.JMSException- if the value of the property is null or if the value can not be converted to Integer type.
-
getBalancingOptions
public int getBalancingOptions() throws jakarta.jms.JMSExceptionGets the options set for application balancing when using uniform clusters and application patterns- Returns:
- the options. The return value may be one of :
- WMQ_BALANCING_OPTIONS_NONE
- WMQ_BALANCING_OPTIONS_IGNORE_TRANSACTIONS
- Throws:
jakarta.jms.JMSException- if the value of the property is null or if the value can not be converted to Integer type.
-
setBrokerCCSubQueue
Sets the name of the broker nondurable connection consumer subscriber queue.- Parameters:
queueName- the name of queue.- Throws:
jakarta.jms.JMSException- if the provided queueName is either null or invalid.
-
setBrokerControlQueue
Sets the name of the broker control queue.- Parameters:
queueName- the name of the broker control queue.- Throws:
jakarta.jms.JMSException- if the provided name is either null or invalid.
-
setBrokerPubQueue
Sets the name of the broker's publish queue. Note that if this is a user-defined queue, the broker must already be aware of this queue before connecting to the broker.- Parameters:
queueName- the name of the publish queue.- Throws:
jakarta.jms.JMSException- if the provided queueName is either null or invalid.
-
setBrokerQueueManager
Sets the name of the broker's queue manager.- Parameters:
queueManagerName- the name of the queue manager.- Throws:
jakarta.jms.JMSException- if the provided queueManagerName is either null or invalid.
-
setBrokerSubQueue
Sets the name of the broker nondurable subscriber queue.- Parameters:
queueName- the name of the queue.- Throws:
jakarta.jms.JMSException- if the provided queueName is either null or invalid.
-
setBrokerVersion
public void setBrokerVersion(int version) throws jakarta.jms.JMSException Sets the version of the broker.- Parameters:
version- possible values are:- Throws:
jakarta.jms.JMSException- if the provided version is invalid.
-
setCertificateValPolicy
public void setCertificateValPolicy(int policy) throws jakarta.jms.JMSException Sets the certificate validation policy- Parameters:
policy- certificate validation policy value- Throws:
jakarta.jms.JMSException- if the provided policy is invalid
-
setCCDTURL
Sets the URL for the client channel definition table.- Parameters:
url- the address of the client channel definition table.
-
setCCDTSSLSocketFactory
Sets the SSLSocketFactory for use with SSL encryption specifically for retrieving CCDT file from https endpoint. Use this to customize all aspects of SSL encryption. Refer to your JSSE provider's documentation for more information on constructing and customizing SSLSocketFactory instances.- Parameters:
sf- the SSLSocketFactory object. If set to null (default), the JSSE default SSLSocketFactory is used when SSL encryption is requested.- Throws:
jakarta.jms.JMSException- if provided value is not an instance of SSLSocketFactory
-
setCCSID
public void setCCSID(int ccsid) throws jakarta.jms.JMSException Sets the character set used within the initial data flow when connecting to the queue manager. The CCSID controls how data is encoded in the communication flow to the queue manager for character data types, such as the channel name and queue manager name. As these flows use fixed width data structures, the specified CCSID value must be a single byte character set in order to be able to use the maximum permitted field lengths. Setting the CCSID on an MQConnectionFactory will not have any effect on the character encoding of message body data.- Parameters:
ccsid- the CCSID. The default value (819) is suitable in most situations.- Throws:
jakarta.jms.JMSException- if the provided value of CCSID is not permitted.
-
setChannel
Sets the name of the channel - applies to client transport mode only.- Parameters:
channelName- the name of the channel.- Throws:
jakarta.jms.JMSException- if the provided channel name is either null or too long.
-
setCleanupInterval
public void setCleanupInterval(long interval) throws jakarta.jms.JMSException Sets the clean up interval.- Parameters:
interval- the clean up interval (milliseconds).- Throws:
jakarta.jms.JMSException- if the provided interval not valid.
-
setCleanupLevel
public void setCleanupLevel(int level) throws jakarta.jms.JMSException Sets the clean up level.- Parameters:
level- permitted levels are:- Throws:
jakarta.jms.JMSException- if level is not as listed above.
-
setClientID
Sets the client ID.Note that this method always throws an IllegalStateException when you make a real-time connection to a broker.
- Parameters:
id- the client ID.
-
setClientId
Deprecated.Sets the client ID.Note that this method always throws an IllegalStateException when you make a real-time connection to a broker.
- Parameters:
id- the client ID.
-
getFileFromURL
Extracts a file object out of provided Key file URI- Parameters:
keyFileUri- Path of the initial key file used for encryption/decryption- Returns:
- Key file object
- Throws:
jakarta.jms.JMSException- If the URI is invalid or not readable
-
setConnTag
public void setConnTag(byte[] cTag) Sets the value of the queue manager connection tag. It is used by the queue manager to serialize access to the affected resources. This tag is only used when connecting to a z/OS queue manager. On other platforms it should have a value equivalent to MQCT_NONE - its default value.- Parameters:
cTag- the connection tag. The value is truncated if it is longer than 128 bytes.
-
setDescription
-
setDirectAuth
public void setDirectAuth(int authority) throws jakarta.jms.JMSException Deprecated.This method was deprecated in a previous version and is no longer supported.- Parameters:
authority- the value to set- Throws:
jakarta.jms.JMSException- if the proposed value is invalid for the property
-
setFailIfQuiesce
public void setFailIfQuiesce(int fiq) throws jakarta.jms.JMSException Sets the default behavior of applications accessing a quiescing queue manager.- Parameters:
fiq- acceptable values are:- Throws:
jakarta.jms.JMSException- if the provided value is neither of the above.
-
setHdrCompList
Sets the list of header compression techniques.- Parameters:
compList- The Collection of header compression techniques to set. The first item in the list to match the server list becomes the current header compression technique.- Throws:
jakarta.jms.JMSException- if the provided list contains invalid values
-
setHostName
Sets the name of the host. This only applies for client connections or direct TCP/IP connections to IBM MQ.- Parameters:
hostname- the name of the host.
-
setLocalAddress
Sets the local address.- Parameters:
address- the local address to be used. The format of a local address is[ip-addr][(low-port[,high-port])]. Here are some examples:- 9.20.4.98
- The channel binds to address 9.20.4.98 locally.
- 9.20.4.98(1000)
- The channel binds to address 9.20.4.98 locally and uses port 1000.
- 9.20.4.98(1000,2000)
- The channel binds to address 9.20.4.98 locally and uses a port in the range 1000 to 2000.
- (1000)
- The channel binds to port 1000 locally.
- (1000,2000)
- The channel binds to a port in the range 1000 to 2000 locally.
You can specify a host name instead of an IP address.
Specify a range of ports to allow for connections that are required internally as well as those explicitly used by an application. The number of ports required depends on the application and the facilities it uses. Typically, this is the number of sessions the application uses plus three or four additional ports. If an application is having difficulty making connections, increase the number of ports in the range.
Note that connection pooling has an effect on how quickly a port can be reused. In JMS, connection pooling is switched on by default and it might be some minutes before a port can be reused. Connection errors might occur in the meantime.
For real-time connections, the local address determines which of the local network interfaces is used for multicast connections. When specifying a local address for a real-time connection, do not include a port number. A port number is not valid for multicast and, if specified, causes a failure at connect time.
- Throws:
jakarta.jms.JMSException- if the format of the local address is incorrect.
-
setMapNameStyle
public void setMapNameStyle(boolean style) Allows compatibility style to be used for map message element names.- Parameters:
style- possible values are:
-
setMaxBufferSize
public void setMaxBufferSize(int size) throws jakarta.jms.JMSException Sets the maximum buffer size. This is the maximum number of received messages that can be stored in an internal message buffer while waiting to be processed by the client application. This property applies only when TRANSPORT has the values DIRECT or DIRECTHTTP.- Parameters:
size- the maximum buffer size.- Throws:
jakarta.jms.JMSException- if the provided size is negative.
-
setMessageRetention
public void setMessageRetention(int mRet) throws jakarta.jms.JMSException Sets what happens to unwanted messages.- Parameters:
mRet- possible values are:- Throws:
jakarta.jms.JMSException- if the supplied value is not one of the above.
-
setMessageSelection
public void setMessageSelection(int selection) throws jakarta.jms.JMSException Sets whether the client or the broker performs message selection.- Parameters:
selection- possible values are:- Throws:
jakarta.jms.JMSException- if selection is not one of the above.
-
setMQConnectionOptions
public void setMQConnectionOptions(int cTagOpt) throws jakarta.jms.JMSException Sets the connection options for a queue manager. This method checks that the options are valid for JMS.- Parameters:
cTagOpt- an int representing the connection options. Only one of the four options relating to connection tags and any of the four options relating to binding type can be set. The only default option set is WMQConstants.MQCNO_STANDARD_BINDING.- Throws:
jakarta.jms.JMSException- if an option or a combination of set options is invalid.
-
setMsgBatchSize
public void setMsgBatchSize(int size) throws jakarta.jms.JMSException Sets the message batch size.- Parameters:
size- the maximum number of messages to be taken at once when using asynchronous delivery.- Throws:
jakarta.jms.JMSException- if the provided value is not valid.
-
setMsgCompList
Sets the list of message compression techniques.- Parameters:
compList- the Collection of message compression techniques to set. The first item in the list to match the server list becomes the current message compression technique.- Throws:
jakarta.jms.JMSException- if the provided message compression list contains invalid values
-
setMulticast
public void setMulticast(int multicast) throws jakarta.jms.JMSException Deprecated.This method was deprecated in a previous version and is no longer supported.- Parameters:
multicast- the value to set- Throws:
jakarta.jms.JMSException- if the provided value is invalid
-
setPollingInterval
public void setPollingInterval(int interval) throws jakarta.jms.JMSException Deprecated.Sets the interval between scans of all receivers during asynchronous message delivery.- Parameters:
interval- the interval in milliseconds.- Throws:
jakarta.jms.JMSException- if the provided value is invalid
-
setPort
public void setPort(int port) throws jakarta.jms.JMSException Sets the port for a client connection.- Parameters:
port- the new value to use.- Throws:
jakarta.jms.JMSException- if port is not a permitted value.
-
setProviderVersion
Deprecated.Sets the provider version that should be used when creating connections.- Parameters:
version- value of the form V.R.M.F or abbreviated forms such as V or V.R, where V, R, M and F are integers representing the version, release, modification level and fixpack. Alternatively, the String value can be set toWMQConstants.JAKARTA_WMQ_PROVIDER_VERSION_DEFAULTwhich has a value of "unspecified".- Throws:
jakarta.jms.JMSException- if the version is invalid
-
setProxyHostName
Deprecated.This method was deprecated in a previous version and is no longer supported.- Parameters:
hostName- the host name of the proxy server when establishing a real-time connection, or null if no proxy server is used.- Throws:
jakarta.jms.JMSException- if the provided host name is not valid.
-
setProxyPort
public void setProxyPort(int proxyPort) throws jakarta.jms.JMSException Deprecated.This method was deprecated in a previous version and is no longer supported.- Parameters:
proxyPort- the port number of the proxy server when establishing a real-time connection.- Throws:
jakarta.jms.JMSException- if the provided value is not valid.
-
setPubAckInterval
public void setPubAckInterval(int interval) throws jakarta.jms.JMSException Sets the number of messages that can be published before requiring acknowledgement from the broker. Applications do not normally alter this value, and must not rely on this acknowledgement.- Parameters:
interval- the number of messages to use as an interval. The default is 25.- Throws:
jakarta.jms.JMSException- if the provided value is not valid.
-
setQueueManager
Sets the name of the queue manager.- Parameters:
queueManagerName- the queue manager which is used when selecting a channel definition. This can be in of the following forms:- "qMgrName", where the actual name of the required queue manager is passed in. The channel must connect to a queue manager of this name.
- "*qMgrName", where "*" followed by the actual name of the required queue manager is passed in. The channel definition that is used must specify this queue manager name. This full name is passed onto the queueManager during a connect, but the queue manager that is ultimately connected to may not have the same name as specified here after the '*'.
- Throws:
jakarta.jms.JMSException- if queueManagerName is either null or too long.
-
setReceiveExit
Sets the receive exit. When writing exits for use with IBM MQ Java, each object must also have a constructor that takes a single string argument. When IBM MQ creates an instance of the exit, it will pass any initialization data into the exit using this constructor.- Parameters:
receiveExit- either the name of the class or a String in the form library(entryPoint) where 'library' is the name of the module where the code resides and 'entryPoint' is the entry point.
-
setReceiveExitInit
Sets the initialization string for the receive exit.- Parameters:
data- the initialization string.
-
setRescanInterval
public void setRescanInterval(int interval) throws jakarta.jms.JMSException Deprecated.Sets the interval between browsing a queue. The scan looks for messages that were not returned by the previous scan.- Parameters:
interval- the interval in milliseconds.- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
setSecurityExit
Sets the security exit. When writing exits for use with IBM MQ Java, each object must also have a constructor that takes a single string argument. When IBM MQ creates an instance of the exit, it will pass any initialization data into the exit using this constructor.- Parameters:
securityExit- either the name of the class or a String in the form library(entryPoint) where 'library' is the name of the module where the code resides and 'entryPoint' is the entry point.
-
setSecurityExitInit
Sets the initialization string for the security exit.- Parameters:
data- the initialization string.
-
setSendCheckCount
public void setSendCheckCount(int interval) throws jakarta.jms.JMSException Sets the interval between send calls to check for errors on asynchronous put.- Parameters:
interval- value to indicate the interval between send calls to check for asynchronous put errors, measured as a count of message sends within a single non-transacted JMS Session.- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
setSendExit
Sets the send exit. When writing exits for use with IBM MQ Java, each object must also have a constructor that takes a single string argument. When IBM MQ creates an instance of the exit, it will pass any initialization data into the exit using this constructor.- Parameters:
sendExit- either the name of the class or a String in the form library(entryPoint) where 'library' is the name of the module where the code resides and 'entryPoint' is the entry point.
-
setSendExitInit
Gets the description of the send exit.- Parameters:
data- either the name of the class or a String in the form library(entryPoint) where 'library' is the name of the module where the code resides and 'entryPoint' is the entry point.
-
setSparseSubscriptions
public void setSparseSubscriptions(boolean sparse) throws jakarta.jms.JMSException Sets whether sparse subscriptions are selected. A sparse subscription is one that receives infrequent matching messages.- Parameters:
sparse- true indicates that sparse subscriptions are selected. This might be required if an application using sparse subscriptions fails to receive messages because of log overflow. If you set the attribute to true , the application must be able to open the consumer queue for browsing messages. The default value of this attribute is false .- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property
-
setSSLCertStores
Provides a collection of CertStore objects used for certificate revocation list (CRL) checking. The certificate provided by the queue manager is checked against one of the CertStore objects contained within the collection; if the certificate is found, the connection attempt fails. At connect-time, each CertStore in the collection is tried in turn until one is successfully used to verify the queue manager's certificate. This property is ignored if sslCipherSuite is null. Use of this property requires Java 2 v1.4. If CertStore objects are specified using this method the MQConnectionFactory cannot be bound into a JNDI namespace. Attempting to do so will result in an exception being thrown.You must make sure that your Java Software Development Kit (SDK) is compatible with the CRL to use CertStore successfully with a CRL hosted on an LDAP server. Some SDKs require that the CRL conforms to RFC 2587, which defines a schema for LDAP v2. Most LDAP v3 servers use RFC 2256 instead.
- Parameters:
stores- the CRL - a list of CertStore objects which contain certificates that have been revoked. Null (the default) means that no checking of the queue manager's certificate is performed.
-
setSSLCertStores
Specifies a list of LDAP servers used for certificate revocation list (CRL) checking. It allows the user to specify the URIs of LDAP CertStore objects as a String, which is converted internally to the Collection form as required by the CertStore checking routines. This method is provided to support storing the CertStore list via JMSAdmin. Each LDAP server is tried in turn until one is successfully used to verify the queue manager's certificate.- Parameters:
stores- this String must consist of a sequence of space-delimited LDAP URIs of the formldap://host[:port]. If no port is specified, the LDAP default of 389 is assumed. If set to null (the default), no checking of the queue manager's certificate is performed.- Throws:
jakarta.jms.JMSException- if the ConnectionFactory supplied list of LDAP URIs is not valid.- See Also:
-
setSSLCipherSuite
Sets the CipherSuite used for SSL encryption. Set this to the CipherSuite matching the CipherSpec set on the SVRCONN channel.- Parameters:
cipherSuite- the CipherSuite used for SSL encryption. If set to null (the default), no SSL encryption is performed.
-
setSSLFipsRequired
public void setSSLFipsRequired(boolean required) Sets whether sslFips (FIPS) is required.- Parameters:
required- true indicates FIPS is required.
-
setSSLPeerName
Sets a distinguished name (DN) pattern. If sslCipherSuite is set, this pattern can ensure that the correct queue manager is used. The connection attempt fails if the distinguished name provided by the queue manager does not match this pattern.- Parameters:
peerName- the DN pattern. If set to null (the default), no checking of the queue manager's DN pattern is performed. This property is ignored if sslCipherSuite is null.- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
setSSLResetCount
public void setSSLResetCount(int bytes) throws jakarta.jms.JMSException Sets the SSL reset count.- Parameters:
bytes- the reset count. This must be an integer, with a value between 0 (disabled) and 999 999 999.- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
setSSLSocketFactory
Sets the SSLSocketFactory for use with SSL encryption. Use this to customize all aspects of SSL encryption. Refer to your JSSE provider's documentation for more information on constructing and customizing SSLSocketFactory instances. If a custom SSLSocketFactory is specified, the MQConnectionFactory cannot be bound into a JNDI namespace. Attempting to do so results in an exception.- Parameters:
sf- the SSLSocketFactory object. If set to null (default), the JSSE default SSLSocketFactory is used when SSL encryption is requested. This property is ignored if sslCipherSuite is null.
-
setStatusRefreshInterval
public void setStatusRefreshInterval(int interval) throws jakarta.jms.JMSException Sets the status refresh interval.- Parameters:
interval- the time between transactions to refresh publish/subscribe status (milliseconds).- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
setSubscriptionStore
public void setSubscriptionStore(int flag) throws jakarta.jms.JMSException Sets the SUBSTORE property.- Parameters:
flag- an integer which represents a valid values of the SUBSTORE property:- Throws:
jakarta.jms.JMSException- if the value supplied is not one of the above.
-
setSyncpointAllGets
public void setSyncpointAllGets(boolean flag) Chooses whether to do all GET operations within a syncpoint. The default setting for this property is false .- Parameters:
flag- true means that all GETs are to be done under syncpoint. The default is false which allows GET operations that are not under transaction management to perform more quickly.
-
setTargetClientMatching
public void setTargetClientMatching(boolean matchClient) Enables or disables target client matching. If this is set to true, then only MQMD messages (those from a non-JMS application) containing a replyTo will have a JMS replyTo ProviderDestination constructed with targetClient set to WMQConstants.WMQ_CLIENT_NONJMS_MQ. This ensures that the reply can be understood by the originator.If this field is set to false , then replies will always contain an RFH2 header, even though the receiver might not understand the reply.
Note that this applies only to point-to-point destinations. This field is set to
trueby default.- Parameters:
matchClient- a boolean indicating whether to enable or disable target client matching.
-
setTemporaryModel
Sets the name of an IBM MQ model queue used when creating JMS temporary destinations.- Parameters:
queueName- the name of the IBM MQ model queue. If refers to a model queue that can be used to create a permanent dynamic queue then you must call theMQTemporaryQueue.delete()method to destroy the queue after use.Within the WebSphere Application Server,
MQTemporaryQueue.delete()will be called by the application server when a connection is being closed. Therefore even if a permanent dynamic model queue is used, the created temporary queue will be destroyed.- Throws:
jakarta.jms.JMSException- if queueName is either null or too long.
-
setTempTopicPrefix
Sets the prefix to use when creating temporary topic names.- Parameters:
prefix- property applicable to all instances of ConnectionFactory, TopicConnectionFactory and their XA equivalents. When creating Temporary Topics, JMS will generate a Topic string of the form TEMP/prefix/<unique id>, or if this property is left with the default value, just TEMP/<unique id>.- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
setTempQPrefix
Sets the prefix to be used to form the name of an IBM MQ dynamic queue.- Parameters:
newTempQPrefix- the prefix to be used to form the name of an IBM MQ dynamic queue. This must end with the '*' character.- Throws:
jakarta.jms.JMSException- if the string is null, empty, greater than 33 characters in length, consists solely of a single character, or ends with a character other than '*'.
-
setTransportType
public void setTransportType(int type) throws jakarta.jms.JMSException Sets the transport type.- Parameters:
type- the transport type. Valid types are:- Throws:
jakarta.jms.JMSException- if the transport is not one of the above.
-
setUseConnectionPooling
public void setUseConnectionPooling(boolean usePooling) Deprecated.JMS does not use connection pooling anymore. Any connection pooling should be done using the facilities provided by the App Server.Set the use of ConnectionPooling in earlier versions of the IBM MQ classes for JMS. This method is retained for compatibility with older MQJMS applications, but, because this Connection Pooling functionality has been removed from version 7, setting this property will have no effect.- Parameters:
usePooling- true sets the useConnectionPooling property.
-
setWildcardFormat
public void setWildcardFormat(int format) throws jakarta.jms.JMSException Sets the formatting to accept when using wildcards.- Parameters:
format- property applicable to all instances of ConnectionFactory, TopicConnectionFactory and their XA equivalents. In the v6 implementation, where publish/subscribe messaging is performed via a broker, different topic wildcard syntax is used depending on which broker is used. In v7, using native publish/subscribe within the queue manager, the wildcard syntax can be chosen via this property.- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
setBalancingApplicationType
public void setBalancingApplicationType(int balType) throws jakarta.jms.JMSException Sets the balancing application type when using uniform clusters and application patterns in J2SE,- Parameters:
balType- Property applicable to instances of ConnectionFactory and their XA equivalents. The return value may be one of :- WMQ_BALANCING_APPLICATION_TYPE_SIMPLE
- WMQ_BALANCING_APPLICATION_TYPE_REQUEST_REPLY
- WMQ_BALANCING_APPLICATION_TYPE_MANAGED (should not be used by J2EE applications)
- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
setAppName
Set the application name on the connection factory- Parameters:
name- of the application- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
setAsyncExceptions
public void setAsyncExceptions(int flags) throws jakarta.jms.JMSException Sets the exception types that should be passed to the user's exception listener.- Parameters:
flags- the ASYNC_EXCEPTIONS_* filter options- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
setBalancingTimeout
public void setBalancingTimeout(int time) throws jakarta.jms.JMSException Set timeout for application balancing- Parameters:
time- the timeout value for application balancing- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
setBalancingOptions
public void setBalancingOptions(int options) throws jakarta.jms.JMSException Set options for application balancing- Parameters:
options- balancing options- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
createConnection
public jakarta.jms.Connection createConnection() throws jakarta.jms.JMSExceptionCreates a connection with the default user identity. The connection is created in stopped mode. No messages are delivered until Connection.start() is explicitly called.Note that the application process ID is used as the default user identity to be passed to the queue manager. If the application is running in client transport mode then this process ID must exist with the relevant authorizations on the server machine. If a different identity is required, then the application should use the createConnection(username, password) method.
- Specified by:
createConnectionin interfacejakarta.jms.ConnectionFactory- Overrides:
createConnectionin classcom.ibm.msg.client.jakarta.jms.admin.JmsConnectionFactoryImpl- Returns:
- a newly created connection.
- Throws:
jakarta.jms.JMSException- if the JMS provider fails to create the connection due to some internal error.jakarta.jms.JMSSecurityException- if client authentication fails due to an invalid user name or password.
-
createConnection
public jakarta.jms.Connection createConnection(String userID, String password) throws jakarta.jms.JMSException Creates a connection with the specified user identity. The connection is created in stopped mode. No messages are delivered until Connection.start() is explicitly called. If a null or empty userid is provided, the password parameter will be interpreted as an authentication token to be provided to the queue manager in place of userid and password.- Specified by:
createConnectionin interfacejakarta.jms.ConnectionFactory- Overrides:
createConnectionin classcom.ibm.msg.client.jakarta.jms.admin.JmsConnectionFactoryImpl- Parameters:
userID- the user name of the caller.password- the password of the caller.- Returns:
- a newly created connection.
- Throws:
jakarta.jms.JMSException- if the JMS provider fails to create the connection due to some internal error.jakarta.jms.JMSSecurityException- if client authentication fails due to an invalid user name or password.
-
getClientReconnectOptions
public int getClientReconnectOptions() throws jakarta.jms.JMSExceptionGet the client reconnection options- Returns:
- The client reconnection options
- Throws:
jakarta.jms.JMSException- If the reconnection options cannot be retrieved
-
setClientReconnectOptions
public void setClientReconnectOptions(int options) throws jakarta.jms.JMSException Specifies the client reconnect options for new connections created by this factory. These can be found in WMQConstants, and will be one of:- WMQ_CLIENT_RECONNECT_AS_DEF (default) - Use the value specified in the mqclient.ini file.
This is set using the 'DefRecon' property within the 'Channels' stanza. It can be set to one
of:
- YES - behaves as the WMQ_CLIENT_RECONNECT option
- NO - default. Does not specify any reconnection options
- QMGR - behaves as the WMQ_CLIENT_RECONNECT_Q_MGR option
- DISABLED - behaves as the WMQ_CLIENT_RECONNECT_DISABLED option
- WMQ_CLIENT_RECONNECT - Reconnect to the any of the queue managers specified in the connection name list
- WMQ_CLIENT_RECONNECT_Q_MGR - Reconnect to the same queue manager we were originally connected to. This will throw MQRC_RECONNECT_QMID_MISMATCH if the queue manager it tries to connect to (specified in the connection name list) has a different QMID to the queue manager originally connected to.
- WMQ_CLIENT_RECONNECT_DISABLED - Reconnection is disabled
- Parameters:
options- New reconnection options- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
- WMQ_CLIENT_RECONNECT_AS_DEF (default) - Use the value specified in the mqclient.ini file.
This is set using the 'DefRecon' property within the 'Channels' stanza. It can be set to one
of:
-
getConnectionNameList
Get the hosts to which the client will attempt to connect to- Returns:
- The client hosts to which the client will attempt to connect
- Throws:
jakarta.jms.JMSException- if the connection name list cannot be retrieved.
-
setConnectionNameList
Specifies the hosts to which the client will attempt to reconnect to after its connection is broken. The connection name list is a comma seperated list of host/ip port pairs.eg. 127.0.0.1(1414),host2.example.com(1400) The default setting of this property is 'localhost(1414)' A null, or empty string is taken to mean localhost(1414)
- Parameters:
hosts- The hosts to connect to- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
getClientReconnectTimeout
public int getClientReconnectTimeout() throws jakarta.jms.JMSExceptionGet the amount of time, in seconds, that a client connection will attempt to reconnect.- Returns:
- the amount of time, in seconds, that a client connection will attempt to reconnect
- Throws:
jakarta.jms.JMSException- if the reconnection timeout cannot be retrieved.
-
setClientReconnectTimeout
public void setClientReconnectTimeout(int timeout) throws jakarta.jms.JMSException Set the amount of time, in seconds, that a client connection will attempt to reconnect. After attempting to reconnect for this amount of time, the client will fail with MQRC_RECONNECT_FAILED. The default setting for this property is WMQConstants.WMQ_CLIENT_RECONNECT_TIMEOUT_DEFAULT.- Parameters:
timeout- is the time in seconds to reconnect- Throws:
jakarta.jms.JMSException- if the property context is marked read-only or if the proposed value is invalid for the property.
-
getUserAuthenticationMQCSP
- Returns:
- USER_AUTHENTICATION_MQCSP property value
-
setUserAuthenticationMQCSP
public void setUserAuthenticationMQCSP(boolean bVal) - Parameters:
bVal- USER_AUTHENTICATION_MQCSP property value
-
getTokenEndpoint
- Returns:
- Token endpoint (URL)
-
setTokenEndpoint
Sets the Token endpoint- Parameters:
tokenEndpoint- URL of the token provider.
-
setTokenSSLSocketFactory
Set the SSLSocketFactory for use with SSL encryption specifically for retrieving JWT for token based authentication from https endpoint. Use this to customize all aspects of SSL encryption. Refer to your JSSE provider's documentation for more information on constructing and customizing SSLSocketFactory instances.- Parameters:
sf- the SSLSocketFactory object. If set to null (default), the JSSE default SSLSocketFactory is used when SSL encryption is requested.- Throws:
jakarta.jms.JMSException- if the provided value is not an instance of SSLSocketFactory
-
getTokenSSLSocketFactory
Get the SSLSocketFactory used with SSL encryption for JWT https endpoint- Returns:
- the SSLSocketFactory.
-
getTokenClientId
- Returns:
- the JWT Client ID.
-
setTokenClientId
Sets the JWT Client ID- Parameters:
clientId- Identifier of the client application as defined in token provider
-
setTokenClientSecret
- Parameters:
clientSecret- client secret for JWT
-
getTokenClientSecret
- Returns:
- the JWT Client Secret.
-
setTokenHttpsCertValidationPolicy
public void setTokenHttpsCertValidationPolicy(int tokenHttpsCertValidation) throws jakarta.jms.JMSException Set the level of validation to be performed for HTTPS certificate validation during Token retrieval- Parameters:
tokenHttpsCertValidation- - specify the level of validation- Throws:
jakarta.jms.JMSException- if provided value is invalid
-
getTokenHttpsCertValidationPolicy
public int getTokenHttpsCertValidationPolicy()Get the level of validation to be performed for HTTPS certificate validation during Token retrieval- Returns:
- the level of certificate validation policy
-
setCCDTHttpsCertValidationPolicy
public void setCCDTHttpsCertValidationPolicy(int ccdtHttpsCertValidation) throws jakarta.jms.JMSException Set the level of validation to be performed for HTTPS certificate validation during CCDT retrieval- Parameters:
ccdtHttpsCertValidation- - specify the level of validation- Throws:
jakarta.jms.JMSException- if provided value is invalid
-
getCCDTHttpsCertValidationPolicy
public int getCCDTHttpsCertValidationPolicy()Get the level of validation to be performed for HTTPS certificate validation during CCDT retrieval- Returns:
- the level of certificate validation policy
-