public class AQjmsConnectionFactory extends java.lang.Object implements javax.naming.spi.ObjectFactory, ConnectionFactory, java.io.Serializable
javax.jms.ConnectionFactory and javax.naming.spi.ObjectFactory.| Constructor and Description |
|---|
AQjmsConnectionFactory()
Constructs a ConnectionFactory object.
|
| Modifier and Type | Method and Description |
|---|---|
Connection |
createConnection()
Creates a connection with the default user identity.
|
Connection |
createConnection(java.lang.String userName, java.lang.String password)
Creates a connection using the specified user identity.
|
javax.sql.DataSource |
getDataSource()
Returns the DataSource property of the connection factory object
|
java.lang.String |
getJdbcURL()
Returns the JdbcURL property of the connection factory object
|
java.lang.Object |
getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)
Creates a connection factory.
|
java.lang.String |
getUsername()
Returns the Username property of the connection factory object
|
void |
setDatasource(javax.sql.DataSource dataSource)
Sets the Datasource property for the connection factory object
|
void |
setJdbcURL(java.lang.String jdbcURL)
Sets the JdbcURL property for the connection factory object
|
void |
setPassword(java.lang.String password)
Sets the Password property for the connection factory object
|
void |
setUsername(java.lang.String user)
Sets the Username property for the connection factory object
|
public AQjmsConnectionFactory()
public void setJdbcURL(java.lang.String jdbcURL)
throws JMSException
jdbcURL - indicates the database to which the connection factory object creates connectionsJMSExceptionpublic java.lang.String getJdbcURL()
public void setUsername(java.lang.String user)
throws JMSException
user - the database user's nameJMSExceptionpublic java.lang.String getUsername()
public void setPassword(java.lang.String password)
throws JMSException
password - the database user's passwordJMSException
public void setDatasource(javax.sql.DataSource dataSource)
throws JMSException
dataSource - indicates the database to which the connection factory object creates connectionsJMSExceptionpublic javax.sql.DataSource getDataSource()
public java.lang.Object getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable environment)
throws JMSException
name and nameCtx.getObjectInstance in interface javax.naming.spi.ObjectFactoryobj - a javax.naming.Reference indicating the connection factory classname - the location containing the database connection attributesnameCtx - a javax.naming.directory.DirContext containing the above locationenvironment - (not used - parameter required by javax.naming.spi.ObjectFactory interface)null if obj is invalid or looking up the provided name in the provided nameCtx returns a null resultJMSException - if a connection factory is not created for any reason other than those listed above (which result in a null return value)public Connection createConnection() throws JMSException
Connection.start method is explicitly called.createConnection in interface ConnectionFactoryJMSException - if the connection is not created due to some error.JMSSecurityException - if client authentication fails due to an invalid user name or password.public Connection createConnection(java.lang.String userName, java.lang.String password) throws JMSException
Connection.start method is explicitly called.createConnection in interface ConnectionFactoryuserName - the caller's user namepassword - the caller's passwordJMSException - if the connection is not created due to some error.JMSSecurityException - if client authentication fails due to an invalid user name or password.