Package org.frankframework.jms
Class JmsSender
java.lang.Object
org.frankframework.jndi.JndiBase
org.frankframework.jms.JMSFacade
org.frankframework.jms.JmsSender
- All Implemented Interfaces:
 FrankElement,HasApplicationContext,HasName,HasPhysicalDestination,IConfigurable,ICorrelatedSender,IScopeProvider,ISender,ISenderWithParameters,IWithParameters,IXAEnabled,NameAware,ConfigurableLifecycle,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
- Direct Known Subclasses:
 BisJmsSender,EsbJmsSender,MQSender
- Author:
 - Gerrit van Brakel
 - Parameters
 - All parameters present are set as message-properties.
 - Specific parameters
 - SoapAction Automatically filled from attribute 
soapAction 
- 
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.frankframework.jms.JMSFacade
JMSFacade.AcknowledgeMode, JMSFacade.DeliveryMode, JMSFacade.JmsDestinationType, JMSFacade.MessageClass, JMSFacade.SubscriberType - 
Field Summary
FieldsFields inherited from class org.frankframework.jms.JMSFacade
JMS_MESSAGECLASS_KEY, log, messagingSourceFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidvoidConfigures the senderprotected jakarta.jms.SessionReturns a session on the connection for a topic or a queuejakarta.jms.DestinationgetDestination(PipeLineSession session, ParameterValueList pvl) sendMessage(Message message, PipeLineSession session) Send a message to some destination (as configured in the Sender object).sendMessage(Message message, PipeLineSession pipeLineSession, String soapHeader) voidsetDeliveryMode(JMSFacade.DeliveryMode deliveryMode) Controls mode that messages are sent withvoidsetDestinationParam(String string) Parameter that is used, if specified and not empty, to determine the destination.voidsetEncodingStyleURI(String string) SOAP encoding style URIvoidsetLinkMethod(JmsSender.LinkMethod method) (Only used whensynchronous=trueandreplyToNameis set).voidsetMessageType(String string) Value of the JMSType fieldvoidsetPriority(int i) Sets the priority that is used to deliver the message.voidsetReplySoapHeaderSessionKey(String string) session key to store SOAP header of replyvoidsetReplyTimeout(int i) (Only forsynchronous=true).voidsetReplyToName(String replyTo) Name of the queue the reply is expected on.voidsetResponseHeadersToSessionKeys(String responseHeaders) A list of JMS headers of the response to add to the PipeLineSessionvoidsetServiceNamespaceURI(String string) SOAP service namespace URIvoidsetSoap(boolean b) Iftrue, messages sent are put in a SOAP envelopevoidsetSoapAction(String string) SOAPAction string sent as message propertyvoidsetSoapHeaderParam(String string) Name of parameter containing SOAP headervoidsetSynchronous(boolean synchronous) Iftrue, the sender operates in RR mode: A reply is expected, either on the queue specified inreplyToName, or on a dynamically generated temporary queuevoidstart()Starts the sendertoString()Methods inherited from class org.frankframework.jms.JMSFacade
checkTransactionManagerValidity, closeSession, createBytesMessage, createMessage, createMessage, createTextMessage, extractMessage, extractMessageBody, getConnectionFactoryName, getContext, getDestination, getDestination, getJmsMessagingSource, getLogPrefix, getMessageConsumer, getMessageConsumer, getMessageConsumerForCorrelationId, getMessageProducer, getMessagingSource, getPhysicalDestinationName, getPhysicalDestinationShortName, getPhysicalDestinationShortName, isRunning, isSessionsArePooled, logMessageDetails, send, send, send, send, send, sendByQueue, sendByTopic, setAcknowledgeMode, setAuthAlias, setCorrelationIdMaxLength, setCorrelationIdToHex, setCorrelationIdToHexPrefix, setDestinationName, setDestinationType, setJndiContextPrefix, setLookupDestination, setMessageClass, setMessageCorrelationID, setMessageSelector, setMessageTimeToLive, setName, setPersistent, setQueueConnectionFactoryName, setSubscriberType, setTopicConnectionFactoryName, setTransacted, stopMethods inherited from class org.frankframework.jndi.JndiBase
getContext, getJndiEnv, setAuthentication, setCredentials, setInitialContextFactoryName, setJmsRealm, setJndiAuthAlias, setJndiProperties, setPrincipal, setProviderURL, setSecurityProtocol, setUrlPkgPrefixesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface org.frankframework.lifecycle.ConfigurableLifecycle
getPhase, isAutoStartup, isConfiguredMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface org.frankframework.core.ISender
isSynchronous, sendMessageOrThrow, stopMethods inherited from interface org.frankframework.core.ISenderWithParameters
consumesSessionVariableMethods inherited from interface org.frankframework.core.IXAEnabled
isTransactedMethods inherited from interface org.springframework.context.SmartLifecycle
stop 
- 
Field Details
- 
paramList
 
 - 
 - 
Constructor Details
- 
JmsSender
public JmsSender() 
 - 
 - 
Method Details
- 
configure
Configures the sender- Specified by:
 configurein interfaceIConfigurable- Overrides:
 configurein classJMSFacade- Throws:
 ConfigurationException- in case it was not able to configure the component.
 - 
createSession
Description copied from class:JMSFacadeReturns a session on the connection for a topic or a queue- Overrides:
 createSessionin classJMSFacade- Throws:
 JmsException
 - 
start
public void start()Starts the sender - 
addParameter
- Specified by:
 addParameterin interfaceIWithParameters
 - 
getParameterList
- Specified by:
 getParameterListin interfaceIWithParameters
 - 
sendMessage
@Nonnull public SenderResult sendMessage(@Nonnull Message message, @Nonnull PipeLineSession session) throws SenderException, TimeoutException Description copied from interface:ISenderSend a message to some destination (as configured in the Sender object). This method may only be called after theconfigure()method is called.The following table shows the difference between synchronous and a-synchronous senders:
synchronous a-synchronous ISender.isSynchronous()returnstruefalsereturn value of sendMessage()isthe reply-message the messageId of the message sent the correlationID specified with sendMessage()may be ignored is sent with the message a {link TimeOutException} may be thrown if a timeout occurs waiting for a reply should not be expected Multiple objects may try to call this method at the same time, from different threads. Implementations of this method should therefore be thread-safe, or
synchronized.- Specified by:
 sendMessagein interfaceISender- Throws:
 SenderExceptionTimeoutException
 - 
sendMessage
@Nonnull public Message sendMessage(@Nonnull Message message, @Nonnull PipeLineSession pipeLineSession, String soapHeader) throws SenderException, TimeoutException - Throws:
 SenderExceptionTimeoutException
 - 
getDestination
public jakarta.jms.Destination getDestination(PipeLineSession session, ParameterValueList pvl) throws JmsException, NamingException, jakarta.jms.JMSException - Throws:
 JmsExceptionNamingExceptionjakarta.jms.JMSException
 - 
toString
 - 
setDestinationParam
Parameter that is used, if specified and not empty, to determine the destination. Overrides thedestinationattribute - 
setSynchronous
public void setSynchronous(boolean synchronous) Iftrue, the sender operates in RR mode: A reply is expected, either on the queue specified inreplyToName, or on a dynamically generated temporary queue- Default value
 - false
 
 - 
setReplyToName
Name of the queue the reply is expected on. This value is sent in the JMSReplyTo-header with the message.- Default value
 - a dynamically generated temporary destination
 
 - 
setLinkMethod
(Only used whensynchronous=trueandreplyToNameis set). Indicates whether the server uses the correlationId from the pipeline, the correlationId from the message or the messageId in the correlationId field of the reply. This requires the sender to have set the correlationId at the time of sending.- Default value
 - MESSAGEID
 
 - 
setReplyTimeout
public void setReplyTimeout(int i) (Only forsynchronous=true). Maximum time in ms to wait for a reply. 0 means no timeout.- Default value
 - 5000
 
 - 
setMessageType
Value of the JMSType field- Default value
 - not set by application
 
 - 
setDeliveryMode
Controls mode that messages are sent with- Default value
 - not set by application
 
 - 
setPriority
public void setPriority(int i) Sets the priority that is used to deliver the message. Ranges from 0 to 9. Defaults to -1, meaning not set. Effectively the default priority is set by JMS to 4- Default value
 - -1
 
 - 
setSoap
public void setSoap(boolean b) Iftrue, messages sent are put in a SOAP envelope- Default value
 - false
 
 - 
setEncodingStyleURI
SOAP encoding style URI - 
setServiceNamespaceURI
SOAP service namespace URI - 
setSoapAction
SOAPAction string sent as message property - 
setSoapHeaderParam
Name of parameter containing SOAP header- Default value
 - soapHeader
 
 - 
setReplySoapHeaderSessionKey
session key to store SOAP header of reply- Default value
 - replySoapHeader
 
 - 
setResponseHeadersToSessionKeys
A list of JMS headers of the response to add to the PipeLineSession 
 -