public class ConnectionFactoryImpl extends java.lang.Object implements XAQueueConnectionFactory, XATopicConnectionFactory, java.io.Serializable, HandleAware
Constructor and Description |
---|
ConnectionFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addConnection(ConnectionImpl conn) |
protected void |
authenticate(java.lang.String username,
java.lang.String password) |
Connection |
createConnection()
Creates a new queue connection
|
Connection |
createConnection(java.lang.String username,
java.lang.String password)
Creates a new connection
|
Queue |
createQueue(java.lang.String name)
Creates queue.
|
QueueConnection |
createQueueConnection()
Creates a new queue connection
|
QueueConnection |
createQueueConnection(java.lang.String username,
java.lang.String password)
Creates a new queue connection
|
Topic |
createTopic(java.lang.String name)
Creates topics.
|
TopicConnection |
createTopicConnection()
Creates a new queue connection
|
TopicConnection |
createTopicConnection(java.lang.String username,
java.lang.String password)
Creates a new queue connection
|
XAConnection |
createXAConnection() |
XAConnection |
createXAConnection(java.lang.String username,
java.lang.String password) |
XAQueueConnection |
createXAQueueConnection() |
XAQueueConnection |
createXAQueueConnection(java.lang.String username,
java.lang.String password) |
XATopicConnection |
createXATopicConnection() |
XATopicConnection |
createXATopicConnection(java.lang.String username,
java.lang.String password) |
ConnectionImpl |
findByClientID(java.lang.String id)
Returns the connection named by the specified client id.
|
java.lang.String |
getName()
Returns the name of the connection factory.
|
void |
init()
Initialize the connection factory.
|
void |
removeConnection(ConnectionImpl conn)
Removes a connection once closed.
|
void |
setClientID(java.lang.String id)
Sets the client id.
|
void |
setDataSource(javax.sql.DataSource dataSource)
Sets the JDBC manager.
|
void |
setName(java.lang.String name)
Sets the name of the connection factory.
|
void |
setPassword(java.lang.String password)
Sets the password.
|
void |
setSerializationHandle(java.lang.Object handle)
Sets the serialization handle
|
void |
setUser(java.lang.String user)
Sets the user.
|
java.lang.String |
toString() |
public void setUser(java.lang.String user)
public void setPassword(java.lang.String password)
public void setName(java.lang.String name)
public java.lang.String getName()
public void setClientID(java.lang.String id)
public void setDataSource(javax.sql.DataSource dataSource)
public void setSerializationHandle(java.lang.Object handle)
setSerializationHandle
in interface HandleAware
public void init() throws ConfigException, java.sql.SQLException
ConfigException
java.sql.SQLException
public Connection createConnection() throws JMSException
createConnection
in interface ConnectionFactory
JMSException
public Connection createConnection(java.lang.String username, java.lang.String password) throws JMSException
createConnection
in interface ConnectionFactory
username
- the username to authenticate with the server.password
- the password to authenticate with the server.JMSException
protected void addConnection(ConnectionImpl conn)
public ConnectionImpl findByClientID(java.lang.String id)
public void removeConnection(ConnectionImpl conn)
public Queue createQueue(java.lang.String name) throws JMSException
JMSException
public Topic createTopic(java.lang.String name) throws JMSException
JMSException
protected void authenticate(java.lang.String username, java.lang.String password) throws JMSException
JMSException
public QueueConnection createQueueConnection() throws JMSException
createQueueConnection
in interface QueueConnectionFactory
JMSException
public QueueConnection createQueueConnection(java.lang.String username, java.lang.String password) throws JMSException
createQueueConnection
in interface QueueConnectionFactory
username
- the username to authenticate with the server.password
- the password to authenticate with the server.JMSException
public TopicConnection createTopicConnection() throws JMSException
createTopicConnection
in interface TopicConnectionFactory
JMSException
public TopicConnection createTopicConnection(java.lang.String username, java.lang.String password) throws JMSException
createTopicConnection
in interface TopicConnectionFactory
username
- the username to authenticate with the server.password
- the password to authenticate with the server.JMSException
public XAConnection createXAConnection() throws JMSException
createXAConnection
in interface XAConnectionFactory
JMSException
public XAConnection createXAConnection(java.lang.String username, java.lang.String password) throws JMSException
createXAConnection
in interface XAConnectionFactory
JMSException
public XAQueueConnection createXAQueueConnection() throws JMSException
createXAQueueConnection
in interface XAQueueConnectionFactory
JMSException
public XAQueueConnection createXAQueueConnection(java.lang.String username, java.lang.String password) throws JMSException
createXAQueueConnection
in interface XAQueueConnectionFactory
JMSException
public XATopicConnection createXATopicConnection() throws JMSException
createXATopicConnection
in interface XATopicConnectionFactory
JMSException
public XATopicConnection createXATopicConnection(java.lang.String username, java.lang.String password) throws JMSException
createXATopicConnection
in interface XATopicConnectionFactory
JMSException
public java.lang.String toString()
toString
in class java.lang.Object