public class JNDISessionFactory extends SessionFactory
JNDISessionFactory
is a Factory of JMS Session objects
which looks up the ConnectionFactory object from JNDI.
Modifier and Type | Field and Description |
---|---|
javax.naming.Context |
context
the initial JNDI context used to lookup ConnectionFactory objects
|
private static org.apache.commons.logging.Log |
log
Logger
|
private java.lang.String |
lookupName
the name used to lookup the ConnectionFactory
|
properties
Constructor and Description |
---|
JNDISessionFactory() |
Modifier and Type | Method and Description |
---|---|
javax.jms.Connection |
createConnection()
Re-implemented from SessionFactory.
|
protected javax.jms.ConnectionFactory |
createConnectionFactory()
Factory method used to create a connection factory.
|
protected javax.naming.Context |
createContext()
Factory method used to create a connection factory.
|
javax.jms.Session |
createSession(javax.jms.Connection connection)
Re-implemented from SessionFactory.
|
javax.naming.Context |
getContext()
Returns the JNDI Context used to lookup JMS ConnectionFactory objects
|
java.lang.String |
getLookupName()
The JNDI Name of the ConnectionFactory
|
void |
setContext(javax.naming.Context context) |
void |
setLookupName(java.lang.String lookupName)
Sets the JNDI Name of the ConnectionFactory
|
addProperty, close, createProperties, createQueueConnection, createServerSessionPool, createSession, createTopicConnection, getAcknowledgeMode, getClientID, getConnection, getConnectionFactory, getPassword, getProperties, getUsername, isTopic, isTransacted, setAcknowledge, setAcknowledgeMode, setClientID, setConnection, setConnectionFactory, setPassword, setProperties, setTopic, setTransacted, setUsername
private static final org.apache.commons.logging.Log log
public javax.naming.Context context
private java.lang.String lookupName
public java.lang.String getLookupName()
public void setLookupName(java.lang.String lookupName)
public javax.naming.Context getContext() throws javax.naming.NamingException
javax.naming.NamingException
public void setContext(javax.naming.Context context)
protected javax.jms.ConnectionFactory createConnectionFactory() throws javax.jms.JMSException
createConnectionFactory
in class SessionFactory
javax.jms.JMSException
public javax.jms.Connection createConnection() throws javax.jms.JMSException
createConnection
in class SessionFactory
javax.jms.JMSException
public javax.jms.Session createSession(javax.jms.Connection connection) throws javax.jms.JMSException
createSession
in class SessionFactory
javax.jms.JMSException
protected javax.naming.Context createContext() throws javax.naming.NamingException
javax.naming.NamingException