|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mqe.jms.MQeConnectionFactory
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.
A ConnectionFactory is a JMS administered object. More information on configuring an MQeConnectionFactory can be found in Chapter 10 of the WebSphere MQ Everyplace Application Programming Guide.
MQeJNDIConnectionFactory
,
MQeQueueConnectionFactory
,
MQeConnection
Constructor Summary | |
MQeConnectionFactory()
Default constructor. |
|
MQeConnectionFactory(java.lang.String iniName)
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 (the username and password are both set to 'default'). |
javax.jms.Connection |
createConnection(java.lang.String username,
java.lang.String password)
Creates a connection with the specified user identity. |
java.lang.String |
getAuthenticatorClass()
returns the name of the class being used for user authentication |
java.lang.String |
getClientID()
Get the client identifier used by all connections created using this Factory. |
java.lang.String |
getDescription()
Get the connection factory description. |
int |
getDUPSOKCount()
Get the number of messages that a Session in DUPS_OK_ACKNOWLEDGE mode will receive before acknowledging the messages. |
java.lang.String |
getIniFileName()
This method returns the name of the configuration (ini) file. |
static boolean |
getJMSXEnabled()
returns true if JMSX properties are included in a message when it is sent |
int |
getShutdownDelay()
Returns the time for which we wait before shutting down the queue manager when the last connection is closed. |
static boolean |
isSQLAllowed()
Returns true if the SQL parser classes were found when the ConnectionFactory was instantiated. |
void |
setAuthenticatorClass(java.lang.String authenticator)
Set the class to be used for username/password authentication. |
void |
setClientID(java.lang.String id)
Set the client identifier to be used for all connections created using this Factory. |
void |
setDescription(java.lang.String desc)
Set the connection factory description. |
void |
setDUPSOKCount(int count)
Set the number of messages that a Session in DUPS_OK_ACKNOWLEDGE mode will accept before acknowledging the received messages. |
void |
setIniFileName(java.lang.String iniFile)
This method sets the name of the configuration (ini) file which startQueueManager() uses to start a client queue manager. |
void |
setJMSXEnabled(boolean enabled)
Enable or disable JMSX properties set on send (JMSXAppID, JMSXUserID). |
void |
setShutdownDelay(int delay)
Set the time in milliseconds to pause before shutting down the queue manager when the last connection is closed. |
void |
setVerboseStartup(boolean verbose)
Display diagnostic information during WebSphere MQ Everyplace Queue Manager startup. |
MQeQueueManager |
startQueueManager()
This method is called when it is necessary to start an instance of the MQe queue manager. |
void |
stopQueueManager()
This method is called by when the last active connection is closed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MQeConnectionFactory()
public MQeConnectionFactory(java.lang.String iniName)
MQeConnectionFactory cf = new MQeConnectionFactory();
cf.setIniFileName("filename.ini");
Method Detail |
public javax.jms.Connection createConnection() throws javax.jms.JMSException
Connection.start
method is explicitly called.
javax.jms.JMSException
- if the JMS provider fails to create the
connection due to some internal error.public javax.jms.Connection createConnection(java.lang.String username, java.lang.String password) throws javax.jms.JMSException
Connection.start
method
is explicitly called.
password
- the caller's password
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.public MQeQueueManager startQueueManager() throws javax.jms.JMSException
This method can be overridden if the administrator wants to start a
queue manager differently. Note that this method is public so that it can be
overridden easily (from another package if necessary) and is not intended to be called
directly. If this method is overridden then it may also be necessary to override
stopQueueManager()
.
java.lang.Exception
- propagated if there is an error starting
the queue manager.
javax.jms.JMSException
public void stopQueueManager() throws java.lang.Exception
startQueueManager()
had started a client queue manager,
this method stops it. If startQueueManager()
found an instance of
a running queue manager, this method doesn’t do anything.
Like startQueueManager
, this method is public so that it can be
overridden if required, rather than to enable it to be called directly.
java.lang.Exception
- propagated if there is an error stopping
the queue manager.public final void setClientID(java.lang.String id)
id
- The value to be set for the client Idpublic final java.lang.String getClientID()
public final void setIniFileName(java.lang.String iniFile)
startQueueManager()
uses to start a client queue manager. If a queue
manager is already running in the JVM then this parameter will be ignored.
iniFile
- The name of the ini file to be used to start the
queue manager.public final java.lang.String getIniFileName()
public final void setDescription(java.lang.String desc)
public final java.lang.String getDescription()
public final void setDUPSOKCount(int count) throws javax.jms.JMSException
javax.jms.JMSException
- if a zero or negative count in specifiedpublic final int getDUPSOKCount()
public void setVerboseStartup(boolean verbose)
public final void setShutdownDelay(int delay)
public final int getShutdownDelay()
public static final boolean isSQLAllowed()
public final void setAuthenticatorClass(java.lang.String authenticator)
createConnection()
.
By default this is set to
com.ibm.mqe.jms.MQeJMSSimpleAuthenticator
authenticator
- classpublic final java.lang.String getAuthenticatorClass()
public final void setJMSXEnabled(boolean enabled)
This is disabled by default.
public static final boolean getJMSXEnabled()
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |