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.
If
clientID
is specified, it indicates the pre-configured client identifier associated with the client
ConnectionFactory
object.
@param clientID the pre-configured client identifier. May be
null
@param userName the caller's user name
@param password the caller's password
@return a newly created connection
@throws InvalidClientIDException if the JMS client specifies an invalidor duplicate client ID.
@throws JMSException if the JMS provider fails to create theconnection due to some internal error.
@throws JMSSecurityException if client authentication fails due to aninvalid user name or password.