public class PushingIfsaProviderListener extends IfsaFacade implements IPortConnectedListener<com.ing.ifsa.IFSAMessage>, IThreadCountControllable, IKnowsDeliveryCount, ITransactionRequirements
IPortConnectedListener
that acts as an IFSA-service.
There is no need or possibility to set the ServiceId as the Provider will receive all messages
for this Application on the same serviceQueue.
The following session keys are set for each message:
ifsa.provider.useSelectors=false
For Fire&Forget providers, the message log might get cluttered with messages like:
This is due to a IFSA requirement, that sessions be created using a parameter transacted=true, indicating
JMS transacted sessions.
[1-10-08 17:10:34:382 CEST] 209d4317 ConnectionMan W J2CA0075W: An active transaction should be present while processing method allocateMCWrapper.
[1-10-08 17:10:34:382 CEST] 209d4317 ConnectionMan W J2CA0075W: An active transaction should be present while processing method initializeForUOW
Modifier and Type | Field and Description |
---|---|
static String |
THREAD_CONTEXT_BIFNAME_KEY |
static String |
THREAD_CONTEXT_ORIGINAL_RAW_MESSAGE_KEY |
log
Constructor and Description |
---|
PushingIfsaProviderListener() |
Modifier and Type | Method and Description |
---|---|
void |
afterMessageProcessed(PipeLineResult plr,
Object rawMessageOrWrapper,
Map<String,Object> threadContext)
Called to perform actions (like committing or sending a reply) after a message has been processed by the
Pipeline.
|
void |
close()
Close all resources used for listening.
|
void |
configure()
Checks if messageProtocol and serviceId (only for Requestors) are specified
|
void |
decreaseThreadCount() |
Message |
extractMessage(com.ing.ifsa.IFSAMessage rawMessage,
Map<String,Object> threadContext)
Extracts message string from raw message.
|
int |
getCurrentThreadCount() |
int |
getDeliveryCount(Object rawMessage) |
String |
getIdFromRawMessage(com.ing.ifsa.IFSAMessage rawMessage,
Map<String,Object> threadContext)
Extracts ID-string from message obtained from raw message}.
|
protected String |
getIdFromWrapper(IMessageWrapper wrapper,
Map<String,Object> threadContext) |
IListenerConnector |
getListenerPortConnector() |
int |
getMaxThreadCount() |
protected Message |
getMessageFromWrapper(IMessageWrapper wrapper,
Map<String,Object> threadContext) |
void |
increaseThreadCount() |
boolean |
isThreadCountControllable() |
boolean |
isThreadCountReadable() |
void |
open()
Prepares the listener for receiving messages.
|
void |
setCacheMode(IListenerConnector.CacheMode cacheMode)
Controls caching of JMS objects.
|
void |
setListenerPort(String listenerPort)
Name of the WebSphere listener port that this JMS Listener binds to.
|
boolean |
transactionalAllowed() |
boolean |
transactionalRequired() |
cleanUpAfterException, closeReplyReceiver, closeService, closeSession, createSender, createSession, getAckMode, getApplicationId, getExpiry, getExpiry, getLogPrefix, getMessageProtocol, getMessageProtocolEnum, getMessagingSource, getName, getPhysicalDestinationName, getProviderSelector, getReplyReceiver, getServiceId, getServiceQueue, getServiceReceiver, getTimeOut, isJmsTransacted, isProvider, isRequestor, isSessionsArePooled, openService, sendMessage, sendReply, setAckMode, setAcknowledgeMode, setApplicationId, setMessageProtocol, setName, setServiceId, setTimeOut, toString, useSelectorsForProviders
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
checkTransactionManagerValidity, getExceptionListener, getHandler, getReceiver, setReceiver
setExceptionListener, setHandler
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
getDomain
public static final String THREAD_CONTEXT_ORIGINAL_RAW_MESSAGE_KEY
public static final String THREAD_CONTEXT_BIFNAME_KEY
public void configure() throws ConfigurationException
IfsaFacade
configure
in interface IConfigurable
configure
in interface IListener<com.ing.ifsa.IFSAMessage>
configure
in class IfsaFacade
ConfigurationException
public void open() throws ListenerException
IListener
open()
is called once each time the listener is started.open
in interface IListener<com.ing.ifsa.IFSAMessage>
ListenerException
public void close() throws ListenerException
IListener
close
in interface IListener<com.ing.ifsa.IFSAMessage>
ListenerException
public boolean transactionalRequired()
transactionalRequired
in interface ITransactionRequirements
public boolean transactionalAllowed()
transactionalAllowed
in interface ITransactionRequirements
public void afterMessageProcessed(PipeLineResult plr, Object rawMessageOrWrapper, Map<String,Object> threadContext) throws ListenerException
IListener
afterMessageProcessed
in interface IListener<com.ing.ifsa.IFSAMessage>
ListenerException
protected String getIdFromWrapper(IMessageWrapper wrapper, Map<String,Object> threadContext)
protected Message getMessageFromWrapper(IMessageWrapper wrapper, Map<String,Object> threadContext)
public String getIdFromRawMessage(com.ing.ifsa.IFSAMessage rawMessage, Map<String,Object> threadContext) throws ListenerException
getIdFromRawMessage
in interface IListener<com.ing.ifsa.IFSAMessage>
ListenerException
public Message extractMessage(com.ing.ifsa.IFSAMessage rawMessage, Map<String,Object> threadContext) throws ListenerException
extractMessage
in interface IListener<com.ing.ifsa.IFSAMessage>
ListenerException
public IListenerConnector getListenerPortConnector()
getListenerPortConnector
in interface IPortConnectedListener<com.ing.ifsa.IFSAMessage>
public void setListenerPort(String listenerPort)
listenerPort
- Name of the listener port, as configured in the application
server.public void setCacheMode(IListenerConnector.CacheMode cacheMode)
public boolean isThreadCountReadable()
isThreadCountReadable
in interface IThreadCountControllable
public boolean isThreadCountControllable()
isThreadCountControllable
in interface IThreadCountControllable
public int getCurrentThreadCount()
getCurrentThreadCount
in interface IThreadCountControllable
public int getMaxThreadCount()
getMaxThreadCount
in interface IThreadCountControllable
public void increaseThreadCount()
increaseThreadCount
in interface IThreadCountControllable
public void decreaseThreadCount()
decreaseThreadCount
in interface IThreadCountControllable
public int getDeliveryCount(Object rawMessage)
getDeliveryCount
in interface IKnowsDeliveryCount
Copyright © 2023 Frank!Framework. All rights reserved.