Package com.adaptris.core.jms
Class PerMessageProducerSessionFactory
- java.lang.Object
-
- com.adaptris.core.jms.ProducerSessionFactoryImpl
-
- com.adaptris.core.jms.PerMessageProducerSessionFactory
-
- All Implemented Interfaces:
ComponentLifecycle
,ProducerSessionFactory
public class PerMessageProducerSessionFactory extends ProducerSessionFactoryImpl
Implementation ofProducerSessionFactory
that creates a new session every time is produced.In the adapter configuration file this class is aliased as jms-per-message-producer-session which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.jms.ProducerSessionFactoryImpl
log, session
-
-
Constructor Summary
Constructors Constructor Description PerMessageProducerSessionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProducerSession
createProducerSession(JmsProducerImpl producer, AdaptrisMessage msg)
Create or reuse an existing session.-
Methods inherited from class com.adaptris.core.jms.ProducerSessionFactoryImpl
close, closeQuietly, createProducerSession, init
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
start, stop
-
-
-
-
Method Detail
-
createProducerSession
public ProducerSession createProducerSession(JmsProducerImpl producer, AdaptrisMessage msg) throws javax.jms.JMSException
Description copied from interface:ProducerSessionFactory
Create or reuse an existing session.- Parameters:
producer
- theJmsProducerImpl
instancemsg
- the message that the producer is currently handling.- Returns:
- a
ProducerSession
- Throws:
javax.jms.JMSException
- if there was a problem creating the session.
-
-