ConnectionFactory


public interface ConnectionFactory
Subinterfaces: QueueConnectionFactory, TopicConnectionFactory,
XAQueueConnectionFactory, and XATopicConnectionFactory

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

WebSphere MQ constructor

MQConnectionFactory
public MQConnectionFactory()

Methods

getCCSID * §
public int getCCSID()

Get the character set of the queue manager.

getChannel * §
public String getChannel()

For client only, get the channel that was used.

getClientId *
public String getClientId()

Get the client Identifier that is used for all connections that are created using this ConnectionFactory.

getDescription *
public String getDescription()

Retrieve the object description.

getHostName *
public String getHostName()

Retrieve the name of the host.

getMsgBatchSize * §
public int getMsgBatchSize()

Return current value of this property.

getPollingInterval * §
public int getPollingInterval()

Return current value of this property.

getPort *
public int getPort()

For client connections or direct TCP/IP connection to WebSphere MQ Event Broker, get the port number.

getQueueManager * §
public String getQueueManager()

Get the name of the queue manager.

getReceiveExit * §
public String getReceiveExit()

Get the name of the receive exit class.

getReceiveExitInit * §
public String getReceiveExitInit()

Get the initialization string that was passed to the receive exit class.

getSecurityExit * §
public String getSecurityExit()

Get the name of the security exit class.

getSecurityExitInit * §
public String getSecurityExitInit()

Get the security exit inittialization string.

getSendExit * §
public String getSendExit()

Get the name of the send exit class.

getSendExitInit * §
public String getSendExitInit()

Get the send exit initialization string.

getSSLCertStores * §
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.

getSSLCertStoresAsString * §
public String getSSLCertStoresAsString()
              throws JMSException

Returns the String of LDAP URIs, set with setSSLCertStores. Throws JMSException if a Collection of CertStores was set.

getSSLCipherSuite * §
public String getSSLCipherSuite()

Returns the CipherSuite used for SSL encryption.

getSSLPeerName * §
public String getSSLPeerName()

Returns the distinguished name pattern used to validate the queue manager.

getSSLSocketFactory * §
public javax.net.ssl.SSLSocketFactory getSSLSocketFactory()

Returns the SSLSocketFactory used with SSL encryption.

getSyncpointAllGets * §
public boolean getSyncpointAllGets()

Return current value of this property.

getTransportType *
public int getTransportType()

Retrieve the transport type.

getUseConnectionPooling * §
public boolean getUseConnectionPooling()

Return current value of this property.

setCCSID * §
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.

setChannel * §
public void setChannel(String x) throws JMSException

For client only, set the channel to use.

setClientId *
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.

setDescription *
public void setDescription(String x)

A short description of the object.

setHostName *
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.

setMsgBatchSize * §
public void setMsgBatchSize(int x)

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

setPollingInterval * §
public void setPollingInterval(int x)

Set the interval between scans of all receivers during asynchronous message delivery. The value is a number of milliseconds.

setPort *
public void setPort(int port) throws JMSException

Set the port for a client connection or direct TCP/IP connection to WebSphere MQ Event Broker.

Parameters:
port - the new value to use.

Throws:
JMSException if the port is negative.

setQueueManager * §
public void setQueueManager(String x) throws JMSException

Set the name of the queue manager to connect to.

setReceiveExit * §
public void setReceiveExit(String receiveExit)

The name of a class that implements a receive exit.

setReceiveExitInit * §
public void setReceiveExitInit(String x)

Initialization string that is passed to the constructor of the receive exit class.

setSecurityExit * §
public void setSecurityExit(String securityExit)

The name of a class that implements a security exit.

setSecurityExitInit * §
public void setSecurityExitInit(String x)

Initialization string that is passed to the security exit constructor.

setSendExit * §
public void setSendExit(String sendExit)

The name of a class that implements a send exit.

setSendExitInit * §
public void setSendExitInit(String x)

Initialization string that is passed to the constructor of send exit.

setSSLCertStores * §
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.

Note:
To use a CertStore successfully with a CRL hosted on an LDAP server, make sure that your Java Software Development Kit (SDK) is compatible with the CRL. 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.

setSSLCertStores * §
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.

Note:
To use a CertStore successfully with a CRL hosted on an LDAP server, make sure that your Java Software Development Kit (SDK) is compatible with the CRL. 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.

setSSLCipherSuite * §
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.

setSSLPeerName * §
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.

setSSLSocketFactory * §
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.

setSyncpointAllGets * §
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.

setTransportType *
public void setTransportType(int x) throws JMSException

Set the transport type to use. It can be one of:

JMSC.MQJMS_TP_BINDINGS_MQ
JMSC.MQJMS_TP_CLIENT_MQ_TCPIP
JMSC.MQJMS_TP_DIRECT_TCPIP

setUseConnectionPooling * §
public void setUseConnectionPooling(boolean x)

Choose whether or not to use connection pooling.



© IBM Corporation 1997, 2002. All Rights Reserved