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 will be 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:
This method can be used only with transport type JMSC.MQJMS_TP_CLIENT_MQ_TCPIP (see ConnectionFactory). The connection is created in stopped mode. No messages will be 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 - uwanted 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 - uwanted messages are dealt with according to their disposition options.

setTemporaryModel *
public void setTemporaryModel(String x) throws JMSException



© IBM Corporation 1997, 2002. All Rights Reserved