Websphere MQ Everyplace

com.ibm.mqe.jms
Class MQeJNDIConnectionFactory

java.lang.Object
  |
  +--com.ibm.mqe.jms.MQeConnectionFactory
        |
        +--com.ibm.mqe.jms.MQeJNDIConnectionFactory
All Implemented Interfaces:
javax.jms.ConnectionFactory, javax.naming.Referenceable, java.io.Serializable
Direct Known Subclasses:
MQeJNDIQueueConnectionFactory

public class MQeJNDIConnectionFactory
extends MQeConnectionFactory
implements java.io.Serializable, javax.naming.Referenceable

MQeJNDIConnectionFactory extends MQeConnectionFactory and adds support for storing and retrieving the object using JNDI.

More information on configuring an MQeJNDIConnectionFactory can be found in Chapter 10 of the WebSphere MQ Everyplace Application Programming Guide.

See Also:
MQeConnectionFactory, Serialized Form

Constructor Summary
MQeJNDIConnectionFactory()
          Default constructor.
MQeJNDIConnectionFactory(java.lang.String iniFileName)
          Constructor taking a String containing the name of a initialization file.
 
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.
 
Methods inherited from class com.ibm.mqe.jms.MQeConnectionFactory
getAuthenticatorClass, getClientID, getDescription, getDUPSOKCount, getIniFileName, getJMSXEnabled, getShutdownDelay, isSQLAllowed, setAuthenticatorClass, setClientID, setDescription, setDUPSOKCount, setIniFileName, setJMSXEnabled, setShutdownDelay, setVerboseStartup, startQueueManager, stopQueueManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.naming.Referenceable
getReference
 

Constructor Detail

MQeJNDIConnectionFactory

public MQeJNDIConnectionFactory()
Default constructor. Creates a MQeJNDIConnectionFactory with default configuration values.


MQeJNDIConnectionFactory

public MQeJNDIConnectionFactory(java.lang.String iniFileName)
Constructor taking a String containing the name of a initialization file. This is equivalent to;

MQeJNDIConnectionFactory cf = new MQeJNDIConnectionFactory();
cf.setIniFileName("filename.ini");

Method Detail

createConnection

public final 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 will be delivered until the Connection.start method is explicitly called.

Overrides:
createConnection in class MQeConnectionFactory
Returns:
a newly created connection
Throws:
javax.jms.JMSException - if the JMS provider fails to create the connection due to some internal error.
Since:
1.1

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 will be delivered until the Connection.start method is explicitly called.

Overrides:
createConnection in class MQeConnectionFactory
Parameters:
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.
javax.jms.JMSSecurityException - if client authentication fails due to an invalid user name or password.
Since:
1.1

Websphere MQ Everyplace