Class JmsItemWriter<T>
java.lang.Object
org.springframework.batch.item.jms.JmsItemWriter<T>
- All Implemented Interfaces:
ItemWriter<T>
An
The implementation is thread-safe after its properties are set (normal singleton behavior).
ItemWriter
for JMS using a JmsTemplate
. The template should have a
default destination, which will be used to send items in write(Chunk)
.The implementation is thread-safe after its properties are set (normal singleton behavior).
- Author:
- Dave Syer, Mahmoud Ben Hassine
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setJmsTemplate
(org.springframework.jms.core.JmsOperations jmsTemplate) Setter for JMS template.void
Send the items one-by-one to the default destination of the JMS template.
-
Field Details
-
logger
protected org.apache.commons.logging.Log logger
-
-
Constructor Details
-
JmsItemWriter
public JmsItemWriter()
-
-
Method Details
-
setJmsTemplate
public void setJmsTemplate(org.springframework.jms.core.JmsOperations jmsTemplate) Setter for JMS template.- Parameters:
jmsTemplate
- aJmsOperations
instance
-
write
Send the items one-by-one to the default destination of the JMS template.- Specified by:
write
in interfaceItemWriter<T>
- Parameters:
items
- of items to be written. Must not benull
.- Throws:
Exception
- if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.- See Also:
-