WebSphere MQ class: MQConnectionFactory
java.lang.Object | +----com.ibm.mq.jms.MQConnectionFactory |
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.
WebSphere MQ Event Broker note |
---|
For direct connections to WebSphere MQ Event Broker, properties accessed by methods marked with a "§" are ignored. |
See also: QueueConnectionFactory, TopicConnectionFactory, XAQueueConnectionFactory, and XATopicConnectionFactory
public MQConnectionFactory()
public int getCCSID()
Get the character set of the queue manager.
public String getChannel()
For client only, get the channel that was used.
public String getClientId()
Get the client Identifier that is used for all connections that are created using this ConnectionFactory.
public String getDescription()
Retrieve the object description.
public String getHostName()
Retrieve the name of the host.
public int getMsgBatchSize()
Return current value of this property.
public int getPollingInterval()
Return current value of this property.
public int getPort()
For client connections or direct TCP/IP connection to WebSphere MQ Event Broker, get the port number.
public String getQueueManager()
Get the name of the queue manager.
public String getReceiveExit()
Get the name of the receive exit class.
public String getReceiveExitInit()
Get the initialization string that was passed to the receive exit class.
public String getSecurityExit()
Get the name of the security exit class.
public String getSecurityExitInit()
Get the security exit inittialization string.
public String getSendExit()
Get the name of the send exit class.
public String getSendExitInit()
Get the send exit initialization string.
public java.util.Collection getSSLCertStores()
Returns a Collection of CertStore objects. If setSSLCertStores() was used to set a Collection of CertStore objects, the value returned from getSSLCertStores() will be a copy of the original Collection. If setSSLCertStores() was used to set a String detailing a list of LDAP URIs, this method returns a Collection of CertStore objects representing the LDAP CRLs.
public String getSSLCertStoresAsString() throws JMSException
Returns the String of LDAP URIs, set with setSSLCertStores. Throws JMSException if a Collection of CertStores was set.
public String getSSLCipherSuite()
Returns the CipherSuite used for SSL encryption.
public String getSSLPeerName()
Returns the distinguished name pattern used to validate the queue manager.
public javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
Returns the SSLSocketFactory used with SSL encryption.
public boolean getSyncpointAllGets()
Return current value of this property.
public int getTransportType()
Retrieve the transport type.
public boolean getUseConnectionPooling()
Return current value of this property.
public void setCCSID(int x) throws JMSException
Set the character set to be used when connecting to the queue manager. See Table 13 for a list of allowed values. We recommend that you use the default value (819) for most situations.
public void setChannel(String x) throws JMSException
For client only, set the channel to use.
public void setClientId(String x)
Sets the client Identifier to be used for all connections created using this Connection.
WebSphere MQ Event Broker note |
---|
This method always throws an IllegalStateException when you make a direct connection to WebSphere MQ Event Broker. |
public void setDescription(String x)
A short description of the object.
public void setHostName(String hostname)
For client connections or direct TCP/IP connections to WebSphere MQ Event Broker, the name of the host to connect to.
public void setMsgBatchSize(int x)
Set the maximum number of messages to be taken at once when using asynchronous delivery.
public void setPollingInterval(int x)
Set the interval between scans of all receivers during asynchronous message delivery. The value is a number of milliseconds.
public void setPort(int port) throws JMSException
Set the port for a client connection or direct TCP/IP connection to WebSphere MQ Event Broker.
public void setQueueManager(String x) throws JMSException
Set the name of the queue manager to connect to.
public void setReceiveExit(String receiveExit)
The name of a class that implements a receive exit.
public void setReceiveExitInit(String x)
Initialization string that is passed to the constructor of the receive exit class.
public void setSecurityExit(String securityExit)
The name of a class that implements a security exit.
public void setSecurityExitInit(String x)
Initialization string that is passed to the security exit constructor.
public void setSendExit(String sendExit)
The name of a class that implements a send exit.
public void setSendExitInit(String x)
Initialization string that is passed to the constructor of send exit.
public void setSSLCertStores(java.util.Collection stores)
Provides a Collection of CertStore objects used for 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 will fail. At connect-time, each CertStore in the Collection is tried in turn until one is successfully used to verify the queue manager's certificate. If set to null (default), no checking of the queue manager's certificate is performed. This property is ignored if sslCipherSuite is null. Use of this property requires Java 2 v1.4.
If CertStores are specified using this method, the MQConnectionFactory cannot be bound into a JNDI namespace. Attempting to do so will result in an exception.
public void setSSLCertStores(String storeSpec) throws JMSException
Specifies a list of LDAP servers used for CRL checking. 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. The certificate provided by the queue manager is checked against one of the listed LDAP CRL servers; if found, the connection will fail. Each LDAP server is tried in turn until one is successfully used to verify the queue manager's certificate. If set to null (default), no checking of the queue manager's certificate is performed. Throws JMSException if the supplied list of LDAP URIs is not valid. This property is ignored if sslCipherSuite is null. Use of this property requires Java 2 v1.4.
public void setSSLCipherSuite(String cipherSuite)
This should be set to the CipherSuite matching the CipherSpec set on the SVRCONN channel. If set to null (default), no SSL encryption is performed. See Appendix H, SSL CipherSuites supported by WebSphere MQ for a list of CipherSuites and their associated CipherSpecs.
public void setSSLPeerName(String peerName) throws JMSException
Sets sslPeerName to a distinguished name pattern. If sslCipherSuite is set, this variable can be used to ensure the correct queue manager is used. For a description of the format for this value, see Using the distinguished name of the queue manager. The distinguished name provided by the queue manager must match this pattern, otherwise the connection attempt will fail. If set to null (default), no checking of the queue manager's DN is performed. Throws JMSException if the supplied pattern is not valid. This property is ignored if sslCipherSuite is null.
public void setSSLSocketFactory(javax.net.ssl.SSLSocketFactory sf)
Sets the SSLSocketFactory for use with SSL encryption. This can be used to customize all aspects of SSL encryption. For more information on constructing and customizing SSLSocketFactory instances, refer to your JSSE provider's documentation. If set to null (default), the JSSE default SSLSocketFactory is used when SSL encryption is requested. This property is ignored if sslCipherSuite is null.
If a custom SSLSocketFactory is specified, the MQConnectionFactory cannot be bound into a JNDI namespace. Attempting to do so will result in an exception.
public void setSyncpointAllGets(boolean x)
Choose whether or not all GET operations will be done within a syncpoint. The default setting for this property is false. This allows GET operations not under transaction management to perform more quickly.
public void setTransportType(int x) throws JMSException
Set the transport type to use. It can be one of:
public void setUseConnectionPooling(boolean x)
Choose whether or not to use connection pooling.