com.ibm.mq.jms
Class MQConnectionFactory

java.lang.Object
  |
  +--com.ibm.mq.jms.MQConnectionFactory
All Implemented Interfaces:
javax.jms.ConnectionFactory, javax.naming.Referenceable, java.io.Serializable
Direct Known Subclasses:
Cleanup, MQQueueConnectionFactory, MQTopicConnectionFactory, MQXAConnectionFactory

public class MQConnectionFactory
extends java.lang.Object
implements javax.jms.ConnectionFactory, javax.naming.Referenceable, java.io.Serializable

MQConnectionFactory is the WebSphere MQ implementation of ConnectionFactory. A ConnectionFactory encapsulates a set of connection configuration parameters that has been defined by an administrator. A client uses it to create a Connection with a JMS provider.

See Also:
Connection, QueueConnectionFactory, TopicConnectionFactory, Serialized Form

Constructor Summary
MQConnectionFactory()
          This is the default constructor.
 
Method Summary
 javax.jms.Connection createConnection()
          Creates a connection with the default user identity.
 javax.jms.Connection createConnection(java.lang.String userName, java.lang.String password)
          Creates a connection with the specified user identity.
 java.lang.String getBrokerCCSubQueue()
          Gets the broker's queue name for nondurable connection consumers.
 java.lang.String getBrokerControlQueue()
          Gets the broker's control queue name.
 java.lang.String getBrokerPubQueue()
          Gets the broker's publish queue name.
 java.lang.String getBrokerQueueManager()
          Gets the name of the broker's queue manager.
 java.lang.String getBrokerSubQueue()
          Gets the broker's queue name for subscribers.
 int getBrokerVersion()
          Gets the version number of the broker.
 java.net.URL getCCDTURL()
          Gets the URL for the client channel definition table.
 int getCCSID()
          Gets the character set of the queue manager.
 java.lang.String getChannel()
          Gets the name of the channel that was used.
 long getCleanupInterval()
          Gets the clean up interval.
 int getCleanupLevel()
          Gets the clean up level.
 java.lang.String getClientId()
          Deprecated. use getClientID instead.
 java.lang.String getClientID()
          Gets the client ID.
 int getCloneSupport()
          Indicates whether cloning is supported.
 byte[] getConnTag()
          Gets the value of the queue manager connection tag.
 java.lang.String getDescription()
          Gets the description.
 int getDirectAuth()
          Gets the type of direct authentication that is required.
 int getFailIfQuiesce()
          Indicates the default behavior of applications accessing a quiescing queue manager.
 java.util.Collection getHdrCompList()
          Gets the list of header compression techniques which has been set.
 java.lang.String getHostName()
          Gets the name of the host.
 java.lang.String getLocalAddress()
          Gets the local address.
 boolean getMapNameStyle()
          Allows compatibility style to be used for MapMessage element names.
 int getMessageRetention()
          Indicates what happens to unwanted messages.
 int getMessageSelection()
          Indicates whether the client or the broker performs message selection.
 int getMQConnectionOptions()
          Gets the connection options.
 int getMsgBatchSize()
          Gets the message batch size.
 java.util.Collection getMsgCompList()
          Gets the list of message compression techniques that have been set.
 int getMulticast()
          Gets the value of the multicast attribute.
 boolean getOptimisticPublication()
          Indicates whether transactional publish/subscribe MessageProducers should return immediately from a send/publish call rather than wait until the message has completed delivery.
 boolean getOutcomeNotification()
          Indicates whether the publish/subscribe MessageConsumers are informed of the outcome of acknowledge or commit calls after receiving messages.
 int getPollingInterval()
          Gets the interval between scans of all receivers during asynchronous message delivery.
 int getPort()
          Gets the port number.
 int getProcessDuration()
          Indicates how promptly received messages are processed.
 java.lang.String getProxyHostName()
          Gets the proxy host name.
 int getProxyPort()
          Gets the port number of the proxy server.
 int getPubAckInterval()
          Gets the number of messages that can be published before requiring acknowledgement from the broker.
 java.lang.String getQueueManager()
          Gets the name of the queue manager.
 java.lang.String getReceiveExit()
          Gets the description of the receive exit.
 java.lang.String getReceiveExitInit()
          Gets the initialization string for the receive exit.
 int getReceiveIsolation()
          Indicates whether calls by MessageConsumers are isolated from other operations.
 javax.naming.Reference getReference()
          Creates a reference for this queue connection factory.
 int getRescanInterval()
          Gets the interval between browse scans of a queue.
 java.lang.String getSecurityExit()
          Gets the description of the security exit.
 java.lang.String getSecurityExitInit()
          Gets the initialization string for the security exit.
 java.lang.String getSendExit()
          Gets the description of the send exit.
 java.lang.String getSendExitInit()
          Gets the initialization string for the send exit.
 boolean getSparseSubscriptions()
          Gets the sparse subscriptions attribute.
 java.util.Collection getSSLCertStores()
          Gets the collection of CertStore objects.
 java.lang.String getSSLCertStoresAsString()
          Gets the collection of CertStore objects as a String.
 java.lang.String getSSLCipherSuite()
          Gets the CipherSuite used for SSL encryption.
 boolean getSSLFipsRequired()
          Indicates whether sslFips (FIPS) is required.
 java.lang.String getSSLPeerName()
          Gets the distinguished name pattern used to validate the queue manager.
 int getSSLResetCount()
          Gets the SSL reset count.
 java.lang.Object getSSLSocketFactory()
          Gets the SSLSocketFactory used with SSL encryption.
 int getStatusRefreshInterval()
          Gets the status refresh interval.
 int getSubscriptionStore()
          Gets the SUBSTORE property.
 boolean getSyncpointAllGets()
          Indicates how syncpoint is used for GET operations.
 boolean getTargetClientMatching()
          is target client matching enabled.
 java.lang.String getTemporaryModel()
          Gets the name of a model queue for creating temporary destinations.
 java.lang.String getTempQPrefix()
          Gets the prefix used to form the name of a WebSphere MQ dynamic queue.
 int getTransportType()
          Gets the transport type.
 boolean getUseConnectionPooling()
          Indicates whether connection pooling has been selected.
 int getVersion()
          Gets the version number.
 void setBrokerCCSubQueue(java.lang.String queueName)
          Sets the name of the broker nondurable connection consumer subscriber queue.
 void setBrokerControlQueue(java.lang.String queueName)
          Sets the name of the broker control queue.
 void setBrokerPubQueue(java.lang.String queueName)
          Sets the name of the broker's publish queue.
 void setBrokerQueueManager(java.lang.String queueManagerName)
          Sets the name of the broker's queue manager.
 void setBrokerSubQueue(java.lang.String queueName)
          Gets the name of the broker nondurable subscriber queue.
 void setBrokerVersion(int version)
          Sets the version of the broker.
 void setCCDTURL(java.net.URL url)
          Sets the URL for the client channel definition table.
 void setCCSID(int ccsid)
          Sets the character set to be used when connecting to the queue manager.
 void setChannel(java.lang.String channelName)
          Sets the name of the channel - applies to clients only.
 void setCleanupInterval(long interval)
          Sets the clean up interval.
 void setCleanupLevel(int level)
          Sets the clean up level.
 void setClientId(java.lang.String id)
          Deprecated. use setClientID() instead.
 void setClientID(java.lang.String id)
          Sets the client ID.
 void setCloneSupport(int type)
          Selects whether cloning is supported.
 void setConnTag(byte[] cTag)
          Sets the value of the queue manager connection tag.
 void setDescription(java.lang.String desc)
          Sets the description.
 void setDirectAuth(int authority)
          Sets the type of direct authentication that is required.
 void setFailIfQuiesce(int fiq)
          Sets the default behavior of applications accessing a quiescing queue manager.
 void setHdrCompList(java.util.Collection compList)
          Sets the list of header compression techniques.
 void setHostName(java.lang.String hostname)
          Sets the name of the host.
 void setLocalAddress(java.lang.String address)
          Sets the local address.
 void setMapNameStyle(boolean style)
          Allows compatibility style to be used for MapMessage element names.
 void setMessageRetention(int mRet)
          Sets what happens to unwanted messages.
 void setMessageSelection(int selection)
          Sets whether the client or the broker performs message selection.
 void setMQConnectionOptions(int cTagOpt)
          Sets the connection options for a queue manager.
 void setMsgBatchSize(int size)
          Sets the message batch size.
 void setMsgCompList(java.util.Collection compList)
          Sets the list of message compression techniques.
 void setMulticast(int multicast)
          Sets the value of the multicast attribute.
 void setOptimisticPublication(boolean newVal)
          Determines whether the publish/subscribe MessageProducers can return immediately from a send/publish call rather than wait until the message has completed delivery.
 void setOutcomeNotification(boolean newVal)
          Determines whether publish/subscribe MessageConsumers are informed of the outcome of acknowledge or commit calls after receiving messages.
 void setPollingInterval(int interval)
          Sets the interval between scans of all receivers during asynchronous message delivery.
 void setPort(int port)
          Sets the port for a client connection.
 void setProcessDuration(int newVal)
          Sets how promptly received messages are processed.
 void setProxyHostName(java.lang.String hostName)
          Sets the proxy host name.
 void setProxyPort(int proxyPort)
          Sets the proxy port attribute.
 void setPubAckInterval(int interval)
          Sets the number of messages that can be published before requiring acknowledgement from the broker.
 void setQueueManager(java.lang.String queueManagerName)
          Sets the name of the queue manager.
 void setReceiveExit(java.lang.String receiveExit)
          Sets the receive exit.
 void setReceiveExitInit(java.lang.String data)
          Sets the initialization string for the receive exit.
 void setReceiveIsolation(int newVal)
          Sets whether calls by MessageConsumers are isolated from other operations.
 void setRescanInterval(int interval)
          Sets the interval between browsing a queue.
 void setSecurityExit(java.lang.String securityExit)
          Sets the security exit.
 void setSecurityExitInit(java.lang.String data)
          Sets the initialization string for the security exit.
 void setSendExit(java.lang.String sendExit)
          Sets the send exit.
 void setSendExitInit(java.lang.String data)
          Gets the description of the send exit.
 void setSparseSubscriptions(boolean sparse)
          Sets whether sparse subscriptions are selected.
 void setSSLCertStores(java.util.Collection stores)
          Provides a collection of CertStore objects used for certificate revocation list (CRL) checking.
 void setSSLCertStores(java.lang.String stores)
          Specifies a list of LDAP servers used for certificate revocation list (CRL) checking.
 void setSSLCipherSuite(java.lang.String cipherSuite)
          Sets the CipherSuite used for SSL encryption.
 void setSSLFipsRequired(boolean required)
          Sets whether sslFips (FIPS) is required.
 void setSSLPeerName(java.lang.String peerName)
          Sets a distinguished name (DN) pattern.
 void setSSLResetCount(int bytes)
          Sets the SSL reset count.
 void setSSLSocketFactory(java.lang.Object sf)
          Sets the SSLSocketFactory for use with SSL encryption.
 void setStatusRefreshInterval(int interval)
          Sets the status refresh interval.
 void setSubscriptionStore(int flag)
          Sets the SUBSTORE property.
 void setSyncpointAllGets(boolean flag)
          Chooses whether to do all GET operations within a syncpoint.
 void setTargetClientMatching(boolean matchClient)
          Enable or disable target client matching.
 void setTemporaryModel(java.lang.String queueName)
          Sets the name of a model queue for creating temporary destinations.
 void setTempQPrefix(java.lang.String newTempQPrefix)
          Sets the prefix to be used to form the name of a WebSphere MQ dynamic queue.
 void setTransportType(int type)
          Sets the transport type.
 void setUseConnectionPooling(boolean usePooling)
          Chooses whether to use connection pooling.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MQConnectionFactory

public MQConnectionFactory()
This is the default constructor. It will create an MQConnectionFactory with all properties set to their default values.

Method Detail

getVersion

public int getVersion()
Gets the version number.

Returns:
the version number of the class.

getLocalAddress

public java.lang.String getLocalAddress()
Gets the local address.

Returns:
the local address.

setLocalAddress

public void setLocalAddress(java.lang.String address)
                     throws javax.jms.JMSException
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 direct connections, the local address determines which of the local network interfaces is used for multicast connections. When specifying a local address for a direct 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:
javax.jms.JMSException - if the format of the local address is incorrect.

getHdrCompList

public java.util.Collection 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

setHdrCompList

public void setHdrCompList(java.util.Collection compList)
                    throws javax.jms.JMSException
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.
javax.jms.JMSException

getMsgCompList

public java.util.Collection 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

setMsgCompList

public void setMsgCompList(java.util.Collection compList)
                    throws javax.jms.JMSException
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:
javax.jms.JMSException

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.

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.

getMQConnectionOptions

public int getMQConnectionOptions()
Gets the connection options.

Returns:
the connection options set for the queue manager

setMQConnectionOptions

public void setMQConnectionOptions(int cTagOpt)
                            throws javax.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 JMSC.MQCNO_STANDARD_BINDING.
Throws:
javax.jms.JMSException - if an option or a combination of set options is invalid.

getFailIfQuiesce

public int getFailIfQuiesce()
Indicates the default behavior of applications accessing a quiescing queue manager.

Returns:
possible values are:

setFailIfQuiesce

public void setFailIfQuiesce(int fiq)
                      throws javax.jms.JMSException
Sets the default behavior of applications accessing a quiescing queue manager.

Parameters:
fiq - acceptable values are:
Throws:
javax.jms.JMSException - if fiq is neither of the above.

getDescription

public java.lang.String getDescription()
Gets the description.

Returns:
the object description.

setDescription

public void setDescription(java.lang.String desc)
Sets the description.

Parameters:
desc - the description.

getTransportType

public int getTransportType()
Gets the transport type.

Returns:
the transport type. Valid types are:

setTransportType

public void setTransportType(int type)
                      throws javax.jms.JMSException
Sets the transport type.

Parameters:
type - the transport type. Valid types are:
Throws:
javax.jms.JMSException - if the transport is not one of the above.

getClientId

public java.lang.String getClientId()
Deprecated. use getClientID instead.

Gets the client ID.

Returns:
the client ID.

getClientID

public java.lang.String 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.


setClientId

public void setClientId(java.lang.String id)
Deprecated. use setClientID() instead.

Sets the client ID.

Parameters:
id - the client ID.

setClientID

public void setClientID(java.lang.String id)
Sets the client ID.

Note that this method always throws an IllegalStateException when you make a direct connection to a broker.

Parameters:
id - the client ID.

getQueueManager

public java.lang.String getQueueManager()
Gets the name of the queue manager.

Returns:
the name.
See Also:
setQueueManager(String)

setQueueManager

public void setQueueManager(java.lang.String queueManagerName)
                     throws javax.jms.JMSException
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 '*'.
  • "*" or "" or a name which consists entirely of blanks is used. The actual queue manager name is disregarded when a channel definition is being selected.
    Throws:
    javax.jms.JMSException - if queueManagerName is either null or too long.

  • setHostName

    public void setHostName(java.lang.String hostname)
    Sets the name of the host. This only applies for client connections or direct TCP/IP connections to WebSphere MQ.

    Parameters:
    hostname - the name of the host.

    getHostName

    public java.lang.String getHostName()
    Gets the name of the host. This only applies for client connections or direct TCP/IP connections to WebSphere MQ.

    Returns:
    the name of the host.

    setPort

    public void setPort(int port)
                 throws javax.jms.JMSException
    Sets the port for a client connection.

    Parameters:
    port - the new value to use.
    Throws:
    javax.jms.JMSException - if port is not a permitted value.

    getPort

    public int getPort()
    Gets the port number. Applies to client connections or direct TCP/IP connection to a broker.

    Returns:
    the port number.

    setCCDTURL

    public void setCCDTURL(java.net.URL url)
    Sets the URL for the client channel definition table.

    Parameters:
    url - the address of the client channel definition table.

    getCCDTURL

    public java.net.URL getCCDTURL()
    Gets the URL for the client channel definition table.

    Returns:
    the address of the client channel definition table.

    setChannel

    public void setChannel(java.lang.String channelName)
                    throws javax.jms.JMSException
    Sets the name of the channel - applies to clients only.

    Parameters:
    channelName - the name of the channel.
    Throws:
    javax.jms.JMSException - if channelName is either null or too long.

    getChannel

    public java.lang.String getChannel()
    Gets the name of the channel that was used.

    Returns:
    the name of the channel.

    setCCSID

    public void setCCSID(int ccsid)
                  throws javax.jms.JMSException
    Sets the character set to be used when connecting to the queue manager.

    Parameters:
    ccsid - the CCSID. The default value (819) is suitable in most situations.
    Throws:
    javax.jms.JMSException - if the value of ccsid is not permitted.

    getCCSID

    public int getCCSID()
    Gets the character set of the queue manager.

    Returns:
    the CCSID.

    setReceiveExit

    public void setReceiveExit(java.lang.String receiveExit)
    Sets the receive exit. When writing exits for use with WebSphere MQ Java, each object must also have a constructor that takes a single string argument. When WebSphere 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.

    getReceiveExit

    public java.lang.String 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.

    setReceiveExitInit

    public void setReceiveExitInit(java.lang.String data)
    Sets the initialization string for the receive exit.

    Parameters:
    data - the initialization string.

    getReceiveExitInit

    public java.lang.String getReceiveExitInit()
    Gets the initialization string for the receive exit.

    Returns:
    the initialization string.

    setSecurityExit

    public void setSecurityExit(java.lang.String securityExit)
    Sets the security exit. When writing exits for use with WebSphere MQ Java, each object must also have a constructor that takes a single string argument. When WebSphere 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.

    getSecurityExit

    public java.lang.String 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.

    setSecurityExitInit

    public void setSecurityExitInit(java.lang.String data)
    Sets the initialization string for the security exit.

    Parameters:
    data - the initialization string.

    getSecurityExitInit

    public java.lang.String getSecurityExitInit()
    Gets the initialization string for the security exit.

    Returns:
    the initialization string.

    setSendExit

    public void setSendExit(java.lang.String sendExit)
    Sets the send exit. When writing exits for use with WebSphere MQ Java, each object must also have a constructor that takes a single string argument. When WebSphere 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.

    getSendExit

    public java.lang.String 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.

    setSendExitInit

    public void setSendExitInit(java.lang.String data)
    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.

    getSendExitInit

    public java.lang.String getSendExitInit()
    Gets the initialization string for the send exit.

    Returns:
    the initialization string.

    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.

    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 javax.jms.Session.AUTO_ACKNOWLEDGE or javax.jms.Session.DUPS_OK_ACKNOWLEDGE acknowledge modes can do GETs outside syncpoint.

    setUseConnectionPooling

    public void setUseConnectionPooling(boolean usePooling)
    Chooses whether to use connection pooling. If you set this to true, JMS enables connection pooling for the lifetime of any connections created through the ConnectionFactory. This also affects connections created with usePooling set to false; to disable connection pooling throughout a JVM, ensure that all ConnectionFactories used within the JVM have usePooling set to false.

    Parameters:
    usePooling - true selects connection pooling. The default, and recommended, value is true. You can disable connection pooling if, for example, your applications run in an environment that performs its own pooling.

    getUseConnectionPooling

    public boolean getUseConnectionPooling()
    Indicates whether connection pooling has been selected.

    Returns:
    true means that JMS has enabled connection pooling for the lifetime of any connections created by this object.

    setMsgBatchSize

    public void setMsgBatchSize(int size)
                         throws javax.jms.JMSException
    Sets the message batch size.

    Parameters:
    size - the maximum number of messages to be taken at once when using asynchronous delivery.
    Throws:
    javax.jms.JMSException

    getMsgBatchSize

    public int getMsgBatchSize()
    Gets the message batch size.

    Returns:
    the maximum number of messages to be taken at once when using asynchronous delivery.

    setPollingInterval

    public void setPollingInterval(int interval)
                            throws javax.jms.JMSException
    Sets the interval between scans of all receivers during asynchronous message delivery.

    Parameters:
    interval - the interval in milliseconds.
    Throws:
    javax.jms.JMSException

    getPollingInterval

    public int getPollingInterval()
    Gets the interval between scans of all receivers during asynchronous message delivery.

    Returns:
    the interval in milliseconds.

    setRescanInterval

    public void setRescanInterval(int interval)
                           throws javax.jms.JMSException
    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.
    javax.jms.JMSException

    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.

    setMapNameStyle

    public void setMapNameStyle(boolean style)
    Allows compatibility style to be used for MapMessage element names.

    Parameters:
    style - possible values are:

    getMapNameStyle

    public boolean getMapNameStyle()
    Allows compatibility style to be used for MapMessage element names.

    Returns:
    possible values are:

    setSSLPeerName

    public void setSSLPeerName(java.lang.String peerName)
                        throws javax.jms.JMSException
    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:
    javax.jms.JMSException - if the supplied pattern is not valid.

    getSSLPeerName

    public java.lang.String getSSLPeerName()
    Gets the distinguished name pattern used to validate the queue manager.

    Returns:
    the distinguished name pattern.

    setSSLCipherSuite

    public void setSSLCipherSuite(java.lang.String cipherSuite)
    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.

    getSSLCipherSuite

    public java.lang.String getSSLCipherSuite()
    Gets the CipherSuite used for SSL encryption.

    Returns:
    the CipherSuite String.

    setSSLCertStores

    public void setSSLCertStores(java.util.Collection stores)
    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

    public void setSSLCertStores(java.lang.String stores)
                          throws javax.jms.JMSException
    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 form ldap://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:
    javax.jms.JMSException - if the ConnectionFactory supplied list of LDAP URIs is not valid.
    See Also:
    setSSLCertStores(Collection)

    getSSLCertStores

    public java.util.Collection getSSLCertStores()
                                          throws javax.jms.JMSException
    Gets the collection of CertStore objects.

    Returns:
    the list of CertStore objects as a Collection. This works whether setSSLCertStores() was used to set a collection of CertStore objects or a String specifying such a list.
    Throws:
    javax.jms.JMSException - if an unsupported type or bad value is encountered.

    getSSLCertStoresAsString

    public java.lang.String getSSLCertStoresAsString()
                                              throws javax.jms.JMSException
    Gets the collection of CertStore objects as a String.

    Returns:
    the list of CertStore objects representing the LDAP CRLs as a String if setSSLCertStores() set it as a String in the first place.
    Throws:
    javax.jms.JMSException - if the CertStore objects were provided as a Collection.

    setSSLSocketFactory

    public void setSSLSocketFactory(java.lang.Object sf)
    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.

    getSSLSocketFactory

    public java.lang.Object getSSLSocketFactory()
    Gets the SSLSocketFactory used with SSL encryption.

    Returns:
    the SSLSocketFactory.

    setTemporaryModel

    public void setTemporaryModel(java.lang.String queueName)
                           throws javax.jms.JMSException
    Sets the name of a model queue for creating temporary destinations.

    Parameters:
    queueName - 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.
    Throws:
    javax.jms.JMSException - if queueName is either null or too long.

    getTemporaryModel

    public java.lang.String getTemporaryModel()
                                       throws javax.jms.JMSException
    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.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setMessageRetention

    public void setMessageRetention(int mRet)
                             throws javax.jms.JMSException
    Sets what happens to unwanted messages.

    Parameters:
    mRet - possible values are:
    Throws:
    javax.jms.JMSException - if mRet is not one of the above.

    getMessageRetention

    public int getMessageRetention()
                            throws javax.jms.JMSException
    Indicates what happens to unwanted messages.

    Returns:
    possible values are:
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    getTempQPrefix

    public java.lang.String getTempQPrefix()
                                    throws javax.jms.JMSException
    Gets the prefix used to form the name of a WebSphere MQ dynamic queue.

    Returns:
    the prefix.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setTempQPrefix

    public void setTempQPrefix(java.lang.String newTempQPrefix)
                        throws javax.jms.JMSException
    Sets the prefix to be used to form the name of a WebSphere MQ dynamic queue.

    Parameters:
    newTempQPrefix - the prefix to be used to form the name of a WebSphere MQ dynamic queue. This must end with the ’*’ character.
    Throws:
    javax.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 ’*’.

    setBrokerControlQueue

    public void setBrokerControlQueue(java.lang.String queueName)
                               throws javax.jms.JMSException
    Sets the name of the broker control queue.

    Parameters:
    queueName - the name of the broker control queue.
    Throws:
    javax.jms.JMSException - if the name is either null or invalid.

    getBrokerControlQueue

    public java.lang.String getBrokerControlQueue()
                                           throws javax.jms.JMSException
    Gets the broker's control queue name.

    Returns:
    the name of the control queue.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setBrokerQueueManager

    public void setBrokerQueueManager(java.lang.String queueManagerName)
                               throws javax.jms.JMSException
    Sets the name of the broker's queue manager.

    Parameters:
    queueManagerName - the name of the queue manager.
    Throws:
    javax.jms.JMSException - if queueManagerName is either null or invalid.

    getBrokerQueueManager

    public java.lang.String getBrokerQueueManager()
                                           throws javax.jms.JMSException
    Gets the name of the broker's queue manager.

    Returns:
    the name of the queue manager.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setBrokerPubQueue

    public void setBrokerPubQueue(java.lang.String queueName)
                           throws javax.jms.JMSException
    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:
    javax.jms.JMSException - if queueName is either null or invalid.

    getBrokerPubQueue

    public java.lang.String getBrokerPubQueue()
                                       throws javax.jms.JMSException
    Gets the broker's publish queue name.

    Returns:
    the name of the queue.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    getBrokerSubQueue

    public java.lang.String getBrokerSubQueue()
                                       throws javax.jms.JMSException
    Gets the broker's queue name for subscribers.

    Returns:
    the name of the queue.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setBrokerSubQueue

    public void setBrokerSubQueue(java.lang.String queueName)
                           throws javax.jms.JMSException
    Gets the name of the broker nondurable subscriber queue.

    Parameters:
    queueName - the name of the queue.
    Throws:
    javax.jms.JMSException - if queueName is either null or invalid.

    getBrokerCCSubQueue

    public java.lang.String getBrokerCCSubQueue()
                                         throws javax.jms.JMSException
    Gets the broker's queue name for nondurable connection consumers.

    Returns:
    the name of the queue.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setBrokerCCSubQueue

    public void setBrokerCCSubQueue(java.lang.String queueName)
                             throws javax.jms.JMSException
    Sets the name of the broker nondurable connection consumer subscriber queue.

    Parameters:
    queueName - the name of queue.
    Throws:
    javax.jms.JMSException - if queueName is either null or invalid.

    getBrokerVersion

    public int getBrokerVersion()
                         throws javax.jms.JMSException
    Gets the version number of the broker.

    Returns:
    the version number.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setBrokerVersion

    public void setBrokerVersion(int version)
                          throws javax.jms.JMSException
    Sets the version of the broker.

    Parameters:
    version - possible values are:
    Throws:
    javax.jms.JMSException - if version is invalid.

    getMessageSelection

    public int getMessageSelection()
                            throws javax.jms.JMSException
    Indicates whether the client or the broker performs message selection.

    Returns:
    possible values are:
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setMessageSelection

    public void setMessageSelection(int selection)
                             throws javax.jms.JMSException
    Sets whether the client or the broker performs message selection.

    Parameters:
    selection - possible values are:
    Throws:
    javax.jms.JMSException - if selection is not one of the above.

    getPubAckInterval

    public int getPubAckInterval()
                          throws javax.jms.JMSException
    Gets the number of messages that can be published before requiring acknowledgement from the broker.

    Returns:
    the acknowledgement interval.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setPubAckInterval

    public void setPubAckInterval(int interval)
                           throws javax.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:
    javax.jms.JMSException - if an internal error occurs.

    getStatusRefreshInterval

    public int getStatusRefreshInterval()
                                 throws javax.jms.JMSException
    Gets the status refresh interval.

    Returns:
    the time between transactions to refresh publish/subscribe status (milliseconds).
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setStatusRefreshInterval

    public void setStatusRefreshInterval(int interval)
                                  throws javax.jms.JMSException
    Sets the status refresh interval.

    Parameters:
    interval - the time between transactions to refresh publish/subscribe status (milliseconds).
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setSubscriptionStore

    public void setSubscriptionStore(int flag)
                              throws javax.jms.JMSException
    Sets the SUBSTORE property.

    Parameters:
    flag - an integer which represents a valid values of the SUBSTORE property:
    Throws:
    javax.jms.JMSException - if flag is not one of the above.

    getSubscriptionStore

    public int getSubscriptionStore()
                             throws javax.jms.JMSException
    Gets the SUBSTORE property.

    Returns:
    an integer which represents a valid values of the SUBSTORE property:
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setCleanupLevel

    public void setCleanupLevel(int level)
                         throws javax.jms.JMSException
    Sets the clean up level.

    Parameters:
    level - permitted levels are:
    Throws:
    javax.jms.JMSException - if level is not as listed above.

    getCleanupLevel

    public int getCleanupLevel()
                        throws javax.jms.JMSException
    Gets the clean up level.

    Returns:
    the clean up level.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setCleanupInterval

    public void setCleanupInterval(long interval)
                            throws javax.jms.JMSException
    Sets the clean up interval.

    Parameters:
    interval - the clean up interval (milliseconds).
    Throws:
    javax.jms.JMSException - if interval is either null or too long.

    getCleanupInterval

    public long getCleanupInterval()
                            throws javax.jms.JMSException
    Gets the clean up interval.

    Returns:
    the clean up interval (milliseconds).
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setCloneSupport

    public void setCloneSupport(int type)
                         throws javax.jms.JMSException
    Selects whether cloning is supported.

    Parameters:
    type - supported values are:
    Throws:
    javax.jms.JMSException - if type is not one of the above.

    getCloneSupport

    public int getCloneSupport()
                        throws javax.jms.JMSException
    Indicates whether cloning is supported.

    Returns:
    supported values are:
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setSparseSubscriptions

    public void setSparseSubscriptions(boolean sparse)
                                throws javax.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:
    javax.jms.JMSException - if an internal error occurs.

    getSparseSubscriptions

    public boolean getSparseSubscriptions()
                                   throws javax.jms.JMSException
    Gets 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:
    javax.jms.JMSException - if an internal error occurs.

    setMulticast

    public void setMulticast(int multicast)
                      throws javax.jms.JMSException
    Sets the value of the multicast attribute.

    Parameters:
    multicast - the following values are possible:
    Throws:
    javax.jms.JMSException - if multicast does not belong to the above.

    getMulticast

    public int getMulticast()
                     throws javax.jms.JMSException
    Gets the value of the multicast attribute.

    Returns:
    the following values are possible:
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setProxyHostName

    public void setProxyHostName(java.lang.String hostName)
                          throws javax.jms.JMSException
    Sets the proxy host name.

    Parameters:
    hostName - the host name of the proxy server when establishing a direct connection, or null if no proxy server is used.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    getProxyHostName

    public java.lang.String getProxyHostName()
                                      throws javax.jms.JMSException
    Gets the proxy host name.

    Returns:
    the host name of the proxy server when establishing a direct connection, or null if no proxy server is used.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setProxyPort

    public void setProxyPort(int proxyPort)
                      throws javax.jms.JMSException
    Sets the proxy port attribute.

    Parameters:
    proxyPort - the port number of the proxy server when establishing a direct connection.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    getProxyPort

    public int getProxyPort()
                     throws javax.jms.JMSException
    Gets the port number of the proxy server.

    Returns:
    the port number of the proxy server.
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    setDirectAuth

    public void setDirectAuth(int authority)
                       throws javax.jms.JMSException
    Sets the type of direct authentication that is required.

    Parameters:
    authority - one of the following:
    Throws:
    javax.jms.JMSException - if authority is neither of the above.

    getDirectAuth

    public int getDirectAuth()
                      throws javax.jms.JMSException
    Gets the type of direct authentication that is required.

    Returns:
    one of the following:
    Throws:
    javax.jms.JMSException - if an internal error occurs.

    getTargetClientMatching

    public boolean getTargetClientMatching()
    is target client matching enabled.

    Returns:
    whether target client matching is enabled.
    See Also:
    setTargetClientMatching(boolean)

    setTargetClientMatching

    public void setTargetClientMatching(boolean matchClient)
    Enable or disable 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 Destination constructed with targetClient set to JMSC.MQJMS_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 true by default.

    Parameters:
    matchClient - a boolean indicating whether to enable or disable target client matching.

    getReceiveIsolation

    public int getReceiveIsolation()
                            throws javax.jms.JMSException
    Indicates whether calls by MessageConsumers are isolated from other operations.

    Returns:
    one of these values:
    Throws:
    javax.jms.JMSException

    setReceiveIsolation

    public void setReceiveIsolation(int newVal)
                             throws javax.jms.JMSException
    Sets whether calls by MessageConsumers are isolated from other operations.

    Parameters:
    newVal - one of these values:
    Throws:
    javax.jms.JMSException

    getOutcomeNotification

    public boolean getOutcomeNotification()
                                   throws javax.jms.JMSException
    Indicates whether the publish/subscribe MessageConsumers are informed of the outcome of acknowledge or commit calls after receiving messages.

    Returns:
    true if MessageConsumers are informed or false if not.
    javax.jms.JMSException

    setOutcomeNotification

    public void setOutcomeNotification(boolean newVal)
                                throws javax.jms.JMSException
    Determines whether publish/subscribe MessageConsumers are informed of the outcome of acknowledge or commit calls after receiving messages.

    Parameters:
    newVal - true if MessageConsumers are to be informed, false if not.
    javax.jms.JMSException

    getProcessDuration

    public int getProcessDuration()
                           throws javax.jms.JMSException
    Indicates how promptly received messages are processed. While this alone does not make any difference, quickly processing messages is a prerequisite for viewing uncommitted messages.

    Returns:
    the process duration (milliseconds).
    javax.jms.JMSException

    setProcessDuration

    public void setProcessDuration(int newVal)
                            throws javax.jms.JMSException
    Sets how promptly received messages are processed. While this alone does not make any difference, quickly processing messages is a prerequisite for viewing uncommitted messages.

    Parameters:
    newVal - the process duration (milliseconds).
    javax.jms.JMSException

    getOptimisticPublication

    public boolean getOptimisticPublication()
                                     throws javax.jms.JMSException
    Indicates whether transactional publish/subscribe MessageProducers should return immediately from a send/publish call rather than wait until the message has completed delivery. If false, failure to deliver the message will only be reported when the message is committed.

    Returns:
    the indicator
    Throws:
    javax.jms.JMSException

    setOptimisticPublication

    public void setOptimisticPublication(boolean newVal)
                                  throws javax.jms.JMSException
    Determines whether the publish/subscribe MessageProducers can return immediately from a send/publish call rather than wait until the message has completed delivery. If false, failure to deliver the message will only be reported when the message is committed.

    Parameters:
    newVal - true requires the MessageProducer to wait until the message has completed delivery false allows the send() or publish() method to return more promptly . This is particularly useful if a MessageConsumer might be receiving uncommitted messages, however it does mean that the MessageProducer will not be informed of a delivery failure until it attempts to commit its sent messages.
    Throws:
    javax.jms.JMSException

    getReference

    public javax.naming.Reference getReference()
                                        throws javax.naming.NamingException
    Creates a reference for this queue connection factory.

    Specified by:
    getReference in interface javax.naming.Referenceable
    Returns:
    the new Reference object.
    Throws:
    javax.naming.NamingException - if there is a naming problem.

    setSSLResetCount

    public void setSSLResetCount(int bytes)
                          throws javax.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:
    javax.jms.JMSException - if bytes is not within the valid range.

    getSSLResetCount

    public int getSSLResetCount()
    Gets the SSL reset count.

    Returns:
    the reset count.

    getSSLFipsRequired

    public boolean getSSLFipsRequired()
    Indicates whether sslFips (FIPS) is required.

    Returns:
    the value.

    setSSLFipsRequired

    public void setSSLFipsRequired(boolean required)
    Sets whether sslFips (FIPS) is required.

    Parameters:
    required - true indicates FIPS is required.

    createConnection

    public javax.jms.Connection createConnection()
                                          throws javax.jms.JMSException
    Creates a connection with the default user identity. The connection is created in stopped mode. No messages are delivered until Connection.start() is explicitly called.

    Specified by:
    createConnection in interface javax.jms.ConnectionFactory
    Returns:
    a newly created connection.
    Throws:
    javax.jms.JMSException - if the JMS provider fails to create the connection due to some internal error.
    JMSSecurityException - if client authentication fails due to an invalid user name or password.

    createConnection

    public javax.jms.Connection createConnection(java.lang.String userName,
                                                 java.lang.String password)
                                          throws javax.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.

    Specified by:
    createConnection in interface javax.jms.ConnectionFactory
    Parameters:
    userName - the caller's user name.
    password - the caller's password.
    Returns:
    a newly created connection.
    Throws:
    javax.jms.JMSException - if the JMS provider fails to create the connection due to some internal error.
    JMSSecurityException - if client authentication fails due to an invalid user name or password.

    (c) Copyright IBM Corp. 2005. All Rights Reserved.