QueueConnectionFactory

 



public interface QueueConnectionFactory
extends ConnectionFactory
Subinterfaces: XAQueueConnectionFactory

WebSphere MQ class: MQQueueConnectionFactory



java.lang.Object
   |
   +----com.ibm.mq.jms.MQConnectionFactory
           |
           +----com.ibm.mq.jms.MQQueueConnectionFactory

A client uses a QueueConnectionFactory to create QueueConnections with a JMS point-to-point provider.

See also: ConnectionFactory and XAQueueConnectionFactory

 

WebSphere MQ constructor

MQQueueConnectionFactory
public MQQueueConnectionFactory()

 

Methods

createQueueConnection
public QueueConnection createQueueConnection()
                                           throws JMSException

Create a queue connection with default user identity. The connection is created in stopped mode. No messages are delivered until Connection.start method is explicitly called.

Returns:
A newly-created queue connection.

Throws:

  • JMSException if JMS provider fails to create queue connection because of an internal error.

  • JMSSecurityException if client authentication fails because of a non valid user name or password.

createQueueConnection
public QueueConnection createQueueConnection
                                 (java.lang.String userName,
                                  java.lang.String password)
                                                        throws JMSException

Create a queue connection with specified user identity.

Note:
Use this method only with transport type JMSC.MQJMS_TP_CLIENT_MQ_TCPIP (see ConnectionFactory). The connection is created in stopped mode. No messages are delivered until Connection.start method is explicitly called.

Parameters:

  • userName: the caller's user name.

  • password: the caller's password.

Returns:
A newly-created queue connection.

Throws:

  • JMSException if JMS Provider fails to create queue connection because of an internal error.

  • JMSSecurityException if client authentication fails because of a non valid user name or password.

getMessageRetention*
public int getMessageRetention()

Get method for messageRetention attribute.

Returns:

  • JMSC.MQJMS_MRET_YES: unwanted messages remain on the input queue.

  • JMSC.MQJMS_MRET_NO: unwanted messages are dealt with according to their disposition options.

getReference *
public Reference getReference() throws NamingException

Create a reference for this queue connection factory .

Returns:
A reference for this object.

Throws:
NamingException.

getTemporaryModel *
public String getTemporaryModel()

setMessageRetention*
public void setMessageRetention(int x) throws JMSException

Set method for messageRetention attribute.

Parameters:
Valid values are:

  • JMSC.MQJMS_MRET_YES: unwanted messages remain on the input queue.

  • JMSC.MQJMS_MRET_NO: unwanted messages are dealt with according to their disposition options. For more information on this, see General principles for point-to-point messaging.

setTemporaryModel *
public void setTemporaryModel(String x) throws JMSException

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.