Search in sources :

Example 31 with TimeOutException

use of nl.nn.adapterframework.core.TimeOutException in project iaf by ibissource.

the class SendJmsMessageExecute method processMessage.

private void processMessage(JmsSender qms, String messageId, String message) {
    // PipeLineSession pls=new PipeLineSession();
    Map ibisContexts = XmlUtils.getIbisContext(message);
    String technicalCorrelationId = messageId;
    if (log.isDebugEnabled()) {
        if (ibisContexts != null) {
            String contextDump = "ibisContext:";
            for (Iterator it = ibisContexts.keySet().iterator(); it.hasNext(); ) {
                String key = (String) it.next();
                String value = (String) ibisContexts.get(key);
                if (log.isDebugEnabled()) {
                    contextDump = contextDump + "\n " + key + "=[" + value + "]";
                }
                if (key.equals("tcid")) {
                    technicalCorrelationId = value;
                }
            }
            log.debug(contextDump);
        }
    }
    try {
        qms.open();
        qms.sendMessage(technicalCorrelationId, message);
    } catch (SenderException e) {
        error("error occured sending message", e);
    } catch (TimeOutException e) {
        error("error occured sending message", e);
    }
    try {
        qms.close();
    } catch (Exception e) {
        error("error occured on closing connection", e);
    }
}
Also used : TimeOutException(nl.nn.adapterframework.core.TimeOutException) Iterator(java.util.Iterator) SenderException(nl.nn.adapterframework.core.SenderException) Map(java.util.Map) ServletException(javax.servlet.ServletException) IOException(java.io.IOException) TimeOutException(nl.nn.adapterframework.core.TimeOutException) SenderException(nl.nn.adapterframework.core.SenderException)

Aggregations

TimeOutException (nl.nn.adapterframework.core.TimeOutException)31 SenderException (nl.nn.adapterframework.core.SenderException)30 ConfigurationException (nl.nn.adapterframework.configuration.ConfigurationException)15 IOException (java.io.IOException)12 HashMap (java.util.HashMap)11 Map (java.util.Map)9 ParameterException (nl.nn.adapterframework.core.ParameterException)9 ParameterValueList (nl.nn.adapterframework.parameters.ParameterValueList)8 LinkedHashMap (java.util.LinkedHashMap)5 TransformerConfigurationException (javax.xml.transform.TransformerConfigurationException)4 FileInputStream (java.io.FileInputStream)3 FileNotFoundException (java.io.FileNotFoundException)3 InputStream (java.io.InputStream)3 Iterator (java.util.Iterator)3 JMSException (javax.jms.JMSException)3 ListenerException (nl.nn.adapterframework.core.ListenerException)3 ParameterResolutionContext (nl.nn.adapterframework.parameters.ParameterResolutionContext)3 JavaListener (nl.nn.adapterframework.receivers.JavaListener)3 DomBuilderException (nl.nn.adapterframework.util.DomBuilderException)3 JCoDestination (com.sap.conn.jco.JCoDestination)2