Search in sources :

Example 1 with ServiceException

use of com.ing.ifsa.exceptions.ServiceException in project iaf by ibissource.

the class IfsaEjbBeanBase method processRequest.

protected String processRequest(ServiceRequest request) throws ServiceException {
    log.debug(">>> processRequest() Processing IFSA Request, generic handling");
    Map threadContext = new HashMap();
    try {
        // listener.populateThreadContext(request, threadContext, null);
        String message = listener.getStringFromRawMessage(request, threadContext);
        String cid = listener.getIdFromRawMessage(request, threadContext);
        String replyText = listener.getHandler().processRequest(listener, cid, message, threadContext);
        if (log.isDebugEnabled()) {
            log.debug("processRequest(): ReplyText=[" + replyText + "]");
        }
        return replyText;
    } catch (ListenerException ex) {
        log.error(ex, ex);
        listener.getExceptionListener().exceptionThrown(listener, ex);
        // Do not invoke rollback, but let IFSA take care of that
        throw new ServiceException(ex);
    } finally {
        log.debug("<<< processRequest() finished generic handling");
    // listener.destroyThreadContext(threadContext);
    }
}
Also used : ListenerException(nl.nn.adapterframework.core.ListenerException) ServiceException(com.ing.ifsa.exceptions.ServiceException) HashMap(java.util.HashMap) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

ServiceException (com.ing.ifsa.exceptions.ServiceException)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 ListenerException (nl.nn.adapterframework.core.ListenerException)1