Package org.jboss.resource.adapter.jms
Class JmsSessionFactoryImpl
- java.lang.Object
-
- org.jboss.resource.adapter.jms.JmsSessionFactoryImpl
-
- All Implemented Interfaces:
AutoCloseable,javax.jms.Connection,javax.jms.QueueConnection,javax.jms.TopicConnection,Referenceable,javax.resource.Referenceable,JmsSessionFactory
public class JmsSessionFactoryImpl extends Object implements JmsSessionFactory, javax.resource.Referenceable
Implements the JMS Connection API and producesJmsSessionobjects.- Author:
- Peter Antman., Jason Dillon, Adrian Brock
-
-
Field Summary
-
Fields inherited from interface org.jboss.resource.adapter.jms.JmsSessionFactory
ISE
-
-
Constructor Summary
Constructors Constructor Description JmsSessionFactoryImpl(javax.resource.spi.ManagedConnectionFactory mcf, javax.resource.spi.ConnectionManager cm, int type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTemporaryQueue(javax.jms.TemporaryQueue temp)Add a temporary queuevoidaddTemporaryTopic(javax.jms.TemporaryTopic temp)Add a temporary topicprotected JmsSessionallocateConnection(boolean transacted, int acknowledgeMode, int sessionType)protected voidcheckClosed()voidclose()voidcloseSession(JmsSession session)Notification that a session is closedjavax.jms.ConnectionConsumercreateConnectionConsumer(javax.jms.Destination destination, String name, javax.jms.ServerSessionPool pool, int maxMessages)javax.jms.ConnectionConsumercreateConnectionConsumer(javax.jms.Destination destination, javax.jms.ServerSessionPool pool, int maxMessages)javax.jms.ConnectionConsumercreateConnectionConsumer(javax.jms.Queue queue, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)javax.jms.ConnectionConsumercreateConnectionConsumer(javax.jms.Topic topic, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)javax.jms.ConnectionConsumercreateDurableConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)javax.jms.QueueSessioncreateQueueSession(boolean transacted, int acknowledgeMode)javax.jms.SessioncreateSession()javax.jms.SessioncreateSession(boolean transacted, int acknowledgeMode)javax.jms.SessioncreateSession(int sessionMode)javax.jms.ConnectionConsumercreateSharedConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)javax.jms.ConnectionConsumercreateSharedDurableConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)javax.jms.TopicSessioncreateTopicSession(boolean transacted, int acknowledgeMode)StringgetClientID()javax.jms.ExceptionListenergetExceptionListener()javax.jms.ConnectionMetaDatagetMetaData()ReferencegetReference()voidsetClientID(String cID)voidsetExceptionListener(javax.jms.ExceptionListener listener)voidsetPassword(char[] password)voidsetReference(Reference reference)voidsetUserName(String name)voidstart()voidstop()
-
-
-
Method Detail
-
setReference
public void setReference(Reference reference)
- Specified by:
setReferencein interfacejavax.resource.Referenceable
-
getReference
public Reference getReference()
- Specified by:
getReferencein interfaceReferenceable
-
setUserName
public void setUserName(String name)
-
setPassword
public void setPassword(char[] password)
-
createQueueSession
public javax.jms.QueueSession createQueueSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException- Specified by:
createQueueSessionin interfacejavax.jms.QueueConnection- Throws:
javax.jms.JMSException
-
createConnectionConsumer
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Queue queue, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException- Specified by:
createConnectionConsumerin interfacejavax.jms.QueueConnection- Throws:
javax.jms.JMSException
-
createTopicSession
public javax.jms.TopicSession createTopicSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException- Specified by:
createTopicSessionin interfacejavax.jms.TopicConnection- Throws:
javax.jms.JMSException
-
createConnectionConsumer
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Topic topic, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException- Specified by:
createConnectionConsumerin interfacejavax.jms.TopicConnection- Throws:
javax.jms.JMSException
-
createDurableConnectionConsumer
public javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException- Specified by:
createDurableConnectionConsumerin interfacejavax.jms.Connection- Specified by:
createDurableConnectionConsumerin interfacejavax.jms.TopicConnection- Throws:
javax.jms.JMSException
-
getClientID
public String getClientID() throws javax.jms.JMSException
- Specified by:
getClientIDin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
setClientID
public void setClientID(String cID) throws javax.jms.JMSException
- Specified by:
setClientIDin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
getMetaData
public javax.jms.ConnectionMetaData getMetaData() throws javax.jms.JMSException- Specified by:
getMetaDatain interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
getExceptionListener
public javax.jms.ExceptionListener getExceptionListener() throws javax.jms.JMSException- Specified by:
getExceptionListenerin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
setExceptionListener
public void setExceptionListener(javax.jms.ExceptionListener listener) throws javax.jms.JMSException- Specified by:
setExceptionListenerin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
start
public void start() throws javax.jms.JMSException- Specified by:
startin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
stop
public void stop() throws javax.jms.JMSException- Specified by:
stopin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
close
public void close() throws javax.jms.JMSException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
closeSession
public void closeSession(JmsSession session) throws javax.jms.JMSException
Description copied from interface:JmsSessionFactoryNotification that a session is closed- Specified by:
closeSessionin interfaceJmsSessionFactory- Throws:
javax.jms.JMSException- for any error
-
addTemporaryQueue
public void addTemporaryQueue(javax.jms.TemporaryQueue temp)
Description copied from interface:JmsSessionFactoryAdd a temporary queue- Specified by:
addTemporaryQueuein interfaceJmsSessionFactory- Parameters:
temp- the temporary queue
-
addTemporaryTopic
public void addTemporaryTopic(javax.jms.TemporaryTopic temp)
Description copied from interface:JmsSessionFactoryAdd a temporary topic- Specified by:
addTemporaryTopicin interfaceJmsSessionFactory- Parameters:
temp- the temporary topic
-
createConnectionConsumer
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination, javax.jms.ServerSessionPool pool, int maxMessages) throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
createConnectionConsumer
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination, String name, javax.jms.ServerSessionPool pool, int maxMessages) throws javax.jms.JMSException- Specified by:
createConnectionConsumerin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
createSession
public javax.jms.Session createSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException- Specified by:
createSessionin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
createSession
public javax.jms.Session createSession(int sessionMode) throws javax.jms.JMSException- Specified by:
createSessionin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
createSession
public javax.jms.Session createSession() throws javax.jms.JMSException- Specified by:
createSessionin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
createSharedConnectionConsumer
public javax.jms.ConnectionConsumer createSharedConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException- Specified by:
createSharedConnectionConsumerin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
createSharedDurableConnectionConsumer
public javax.jms.ConnectionConsumer createSharedDurableConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException- Specified by:
createSharedDurableConnectionConsumerin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
allocateConnection
protected JmsSession allocateConnection(boolean transacted, int acknowledgeMode, int sessionType) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
checkClosed
protected void checkClosed() throws javax.jms.IllegalStateException- Throws:
javax.jms.IllegalStateException
-
-