jdbc-outbound-gateway async error handling in Spring -
I apply an error-and-forget flow to log messages on a database by calling an oracle process I am trying to do everything well, but I want to log on to any exception, when by any chance, I have incorrectly configured XML or whatever may be wrong (process By stripping any exceptions?). I've been divorced for some time but I'm missing perhaps something ...
Here is the actual setting: I have a Gateway Interface
public interface Getveintrfesaf { Zero monitoring (object payload); }
XML definition of the gateway
& lt; Int: gateway service-interface = "gateway interface adf" & gt; & Lt; Int: method name = "monitoring" request-channel = "monitoring gateway inbound" /> & Lt; / Integer: gateway & gt;
Then JDBC-outbound-gateway xml configuration which calls for an Oracle process:
and channel ID = "Monitoring Gateway Inbound" & Gt; & Lt; Int: Dispatcher Functional = "Monitoring Task Expector" /> & Lt; / Integer: channel & gt; & Lt; Puarnank- JDBC: stored proc- outbound-Gateway ID = "MonitoringGatewayProcedure" requested channel = "MonitoringGatewayInbound" Data Source = "data source" stored-procedure-name = "ProcedureName" investment cost required = "false" Neglect column -Meta data = "true" & gt; & Lt; Int-jdbc: sql-parameter-definition some parameter / & gt; & Lt; Int-jdbc: parameter parameter mapping / & gt; & Lt; / Integer-JDBC: stored-proc-outbound gateway & gt;
Thank you in advance
I have found this: but it is not working: am I not able to implement it, but still.
Update: I'll get wrapped logs
| Test | 2014-10-17 17: 09: 08,999 ||| 059EF53A6C4D2F67E0540003BA7A7C43 [MonitoringTaskExecutor-1] | Information | STDOUT | 17: 09: 08,999 ERROR [LoggingHandler] org.springframework .integration.MessageHandlingException: Send Error Handler [org.springframework.integration.jdbc.StoredProcOutboundGateway # 0]
UPDATE2: jboss- Log4j.xml I am using
& lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; ! & Lt; DOCTYPE log4j: configuration Public "- // APACHE // DTD log4j 1.2 // EN" "logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd" & gt ; & Lt; Log4j: configuration debug = "true" xmlns: log4j = 'http: //jakarta.apache.org/log4j/'> & Lt; Appender Name = "STDFEE" class = "org.jboss.logging.appender.DailyRollingFileAppender" & gt; & Lt; Param name = "append" value = "true" /> & Lt; Param name = "file" value = "/ var / share / test / logs / test-ws_out.log" /> & Lt; Param name = "datePattern" value = "yyyy-MM-dd" /> & Lt; Layout class = "org.apache.log4j.PatternLayout" & gt; & Lt; param name = "ConversionPattern" value = "test |% d |% X {req.remoteHost} |% X {sessionid} |% X {lcontext} | [% t] |% -5p |% c |% m% n | "/ & Gt; & Lt; / Layout & gt; & Lt; / Appender & gt; & Lt; Root & gt; & Lt; Level value = "INFO" /> & Lt; Appender-Reef Ref = "STDFEE" /> & Lt; / Root & gt; & Lt; / Log4j: Configuration & gt;
Since you are using ExcutorChannel
, any Exception
from bottomstream flow to error message
is wrapped in and sent to default errorChannel
:
By default, All exceptions are locked error
level with org.springframework.integration.handler
under the logging handler
class.
On the other hand, you ExpressionEvaluatingRequestHandlerAdvice
for < Integer-JDBC: stored-proc-outbound gateway & gt;
:
And simply to deal with the exception to that goal message handler
Comments
Post a Comment