public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForContextImpl implements ActiveMQRASessionFactory, ActiveMQConnectionForContext, javax.resource.Referenceable
ActiveMQRASession
objects.threadAwareContext
ISE
Constructor and Description |
---|
ActiveMQRASessionFactoryImpl(ActiveMQRAManagedConnectionFactory mcf,
javax.resource.spi.ConnectionManager cm,
TransactionManager tm,
int type)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addTemporaryQueue(javax.jms.TemporaryQueue temp)
Add temporary queue
|
void |
addTemporaryTopic(javax.jms.TemporaryTopic temp)
Add temporary topic
|
protected ActiveMQRASession |
allocateConnection(boolean transacted,
int acknowledgeMode,
int sessionType)
Allocate a connection
|
protected ActiveMQRASession |
allocateConnection(int sessionType)
Allocation a connection
|
protected void |
checkClosed()
Check if we are closed
|
void |
close()
Close
|
void |
closeSession(ActiveMQRASession session)
Close session
|
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Destination destination,
javax.jms.ServerSessionPool pool,
int maxMessages)
Create a connection consumer -- throws IllegalStateException
|
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Destination destination,
String name,
javax.jms.ServerSessionPool pool,
int maxMessages)
Create a connection consumer -- throws IllegalStateException
|
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Queue queue,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
Create a connection consumer -- throws IllegalStateException
|
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Topic topic,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
Create a connection consumer -- throws IllegalStateException
|
javax.jms.JMSContext |
createContext(int sessionMode) |
javax.jms.ConnectionConsumer |
createDurableConnectionConsumer(javax.jms.Topic topic,
String subscriptionName,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
Create a durable connection consumer -- throws IllegalStateException
|
javax.jms.QueueSession |
createQueueSession(boolean transacted,
int acknowledgeMode)
Create a queue session
|
javax.jms.Session |
createSession() |
javax.jms.Session |
createSession(boolean transacted,
int acknowledgeMode)
Create a session
|
javax.jms.Session |
createSession(int sessionMode) |
javax.jms.ConnectionConsumer |
createSharedConnectionConsumer(javax.jms.Topic topic,
String subscriptionName,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages) |
javax.jms.ConnectionConsumer |
createSharedDurableConnectionConsumer(javax.jms.Topic topic,
String subscriptionName,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages) |
javax.jms.TopicSession |
createTopicSession(boolean transacted,
int acknowledgeMode)
Create a topic session
|
javax.jms.XAJMSContext |
createXAContext() |
javax.jms.XAQueueSession |
createXAQueueSession()
Create a XA queue session
|
javax.jms.XASession |
createXASession()
Create a XA session
|
javax.jms.XATopicSession |
createXATopicSession()
Create a XA topic session
|
String |
getClientID()
Get the client ID
|
javax.jms.ExceptionListener |
getExceptionListener()
Get the exception listener -- throws IllegalStateException
|
javax.jms.ConnectionMetaData |
getMetaData()
Get the connection metadata
|
Reference |
getReference()
Get the naming reference
|
void |
setClientID(String cID)
Set the client ID -- throws IllegalStateException
|
void |
setExceptionListener(javax.jms.ExceptionListener listener)
Set the exception listener -- throws IllegalStateException
|
void |
setPassword(String password)
Set the password
|
void |
setReference(Reference reference)
Set the naming reference
|
void |
setUserName(String name)
Set the user name
|
void |
start()
Start
|
void |
stop()
Stop
|
closeFromContext, getThreadAwareContext, incrementRefCounter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
closeFromContext
public ActiveMQRASessionFactoryImpl(ActiveMQRAManagedConnectionFactory mcf, javax.resource.spi.ConnectionManager cm, TransactionManager tm, int type)
mcf
- The managed connection factorycm
- The connection managertype
- The connection typepublic javax.jms.JMSContext createContext(int sessionMode)
createContext
in interface ActiveMQConnectionForContext
createContext
in class ActiveMQConnectionForContextImpl
public javax.jms.XAJMSContext createXAContext()
createXAContext
in interface ActiveMQConnectionForContext
createXAContext
in class ActiveMQConnectionForContextImpl
public void setReference(Reference reference)
reference
- The referencepublic Reference getReference()
getReference
in interface Referenceable
public void setUserName(String name)
name
- The user namepublic void setPassword(String password)
password
- The passwordpublic String getClientID() throws javax.jms.JMSException
getClientID
in interface javax.jms.Connection
javax.jms.JMSException
- Thrown if an error occurspublic void setClientID(String cID) throws javax.jms.JMSException
setClientID
in interface javax.jms.Connection
cID
- The client IDjavax.jms.JMSException
- Thrown if an error occurspublic javax.jms.QueueSession createQueueSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException
createQueueSession
in interface javax.jms.QueueConnection
createQueueSession
in interface javax.jms.XAQueueConnection
transacted
- Use transactionsacknowledgeMode
- The acknowledge modejavax.jms.JMSException
- Thrown if an error occurspublic javax.jms.XAQueueSession createXAQueueSession() throws javax.jms.JMSException
createXAQueueSession
in interface javax.jms.XAQueueConnection
javax.jms.JMSException
- Thrown if an error occurspublic javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Queue queue, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
createConnectionConsumer
in interface javax.jms.QueueConnection
queue
- The queuemessageSelector
- The message selectorsessionPool
- The session poolmaxMessages
- The number of max messagesjavax.jms.JMSException
- Thrown if an error occurspublic javax.jms.TopicSession createTopicSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException
createTopicSession
in interface javax.jms.TopicConnection
createTopicSession
in interface javax.jms.XATopicConnection
transacted
- Use transactionsacknowledgeMode
- The acknowledge modejavax.jms.JMSException
- Thrown if an error occurspublic javax.jms.XATopicSession createXATopicSession() throws javax.jms.JMSException
createXATopicSession
in interface javax.jms.XATopicConnection
javax.jms.JMSException
- Thrown if an error occurspublic javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Topic topic, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
createConnectionConsumer
in interface javax.jms.TopicConnection
topic
- The topicmessageSelector
- The message selectorsessionPool
- The session poolmaxMessages
- The number of max messagesjavax.jms.JMSException
- Thrown if an error occurspublic javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
createDurableConnectionConsumer
in interface javax.jms.Connection
createDurableConnectionConsumer
in interface javax.jms.TopicConnection
topic
- The topicsubscriptionName
- The subscription namemessageSelector
- The message selectorsessionPool
- The session poolmaxMessages
- The number of max messagesjavax.jms.JMSException
- Thrown if an error occurspublic javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination, javax.jms.ServerSessionPool pool, int maxMessages) throws javax.jms.JMSException
destination
- The destinationpool
- The session poolmaxMessages
- The number of max messagesjavax.jms.JMSException
- Thrown if an error occurspublic javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination, String name, javax.jms.ServerSessionPool pool, int maxMessages) throws javax.jms.JMSException
createConnectionConsumer
in interface javax.jms.Connection
destination
- The destinationname
- The namepool
- The session poolmaxMessages
- The number of max messagesjavax.jms.JMSException
- Thrown if an error occurspublic javax.jms.Session createSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException
createSession
in interface javax.jms.Connection
createSession
in interface javax.jms.XAConnection
transacted
- Use transactionsacknowledgeMode
- The acknowledge modejavax.jms.JMSException
- Thrown if an error occurspublic javax.jms.XASession createXASession() throws javax.jms.JMSException
createXASession
in interface javax.jms.XAConnection
javax.jms.JMSException
- Thrown if an error occurspublic javax.jms.ConnectionMetaData getMetaData() throws javax.jms.JMSException
getMetaData
in interface javax.jms.Connection
javax.jms.JMSException
- Thrown if an error occurspublic javax.jms.ExceptionListener getExceptionListener() throws javax.jms.JMSException
getExceptionListener
in interface javax.jms.Connection
javax.jms.JMSException
- Thrown if an error occurspublic void setExceptionListener(javax.jms.ExceptionListener listener) throws javax.jms.JMSException
setExceptionListener
in interface javax.jms.Connection
listener
- The exception listenerjavax.jms.JMSException
- Thrown if an error occurspublic void start() throws javax.jms.JMSException
start
in interface javax.jms.Connection
javax.jms.JMSException
- Thrown if an error occurspublic void stop() throws javax.jms.JMSException
stop
in interface javax.jms.Connection
javax.jms.IllegalStateException
javax.jms.JMSException
- Thrown if an error occurspublic void close() throws javax.jms.JMSException
close
in interface AutoCloseable
close
in interface javax.jms.Connection
javax.jms.JMSException
- Thrown if an error occurspublic void closeSession(ActiveMQRASession session) throws javax.jms.JMSException
closeSession
in interface ActiveMQRASessionFactory
session
- The sessionjavax.jms.JMSException
- Thrown if an error occurspublic void addTemporaryQueue(javax.jms.TemporaryQueue temp)
addTemporaryQueue
in interface ActiveMQRASessionFactory
temp
- The temporary queuepublic void addTemporaryTopic(javax.jms.TemporaryTopic temp)
addTemporaryTopic
in interface ActiveMQRASessionFactory
temp
- The temporary topicpublic javax.jms.Session createSession(int sessionMode) throws javax.jms.JMSException
createSession
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.Session createSession() throws javax.jms.JMSException
createSession
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionConsumer createSharedConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
createSharedConnectionConsumer
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionConsumer createSharedDurableConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
createSharedDurableConnectionConsumer
in interface javax.jms.Connection
javax.jms.JMSException
protected ActiveMQRASession allocateConnection(int sessionType) throws javax.jms.JMSException
sessionType
- The session typejavax.jms.JMSException
- Thrown if an error occursprotected ActiveMQRASession allocateConnection(boolean transacted, int acknowledgeMode, int sessionType) throws javax.jms.JMSException
transacted
- Use transactionsacknowledgeMode
- The acknowledge modesessionType
- The session typejavax.jms.JMSException
- Thrown if an error occursprotected void checkClosed() throws javax.jms.IllegalStateException
javax.jms.IllegalStateException
- Thrown if closedCopyright © 2016 The Apache Software Foundation. All rights reserved.