0
경로 내에 들어오는 모든 메시지를 처리하고 데이터베이스에 저장하는 작업이 있습니다. 내 경로가 webservice (camel-cxf)로 시작한 다음 ejb로 처리하여 비누 응답을 반환합니다.Camel + sql + 오류 처리
나는 camel-sql 구성 요소를 사용하기로 결정했습니다. 지금까지 내가 로깅 수신 메시지에 어떤 문제가 발생하지 않는 :
<camelContext id="InstitutionContext" xmlns="http://camel.apache.org/schema/spring">
<onException>
<exception>org.example.MyException</exception>
<continued><constant>true</constant></continued>
<to uri="bean:myExceptionHandler?method=handle" />
</onException>
<route id="InstitutionRoute" >
<from uri="direct:start" />
<to uri="sql:insert into translog(id,type,data) values(2,'IN',#)" />
<split>
<tokenize token="\n" />
<unmarshal>
<csv delimiter=";" />
</unmarshal>
<process ref="InstitutionProcessorTest" />
</split>
<to uri="bean:myExceptionHandler?method=checkErrors" />
</route>
</camelContext>
을하지만 예외를 처리하고 SOAP 메시지의 형태에 저장하는 방법을 생각하지 않습니다.
<onCompletion onFailureOnly="true">
<to uri="sql:insert into translog(id,type,data) values(2,'ERROR',#)" />
</onCompletion>
그러나 원래의 메시지는 데이터 열에 저장됩니다. 도울 수있는 시체가 있습니까?
감사합니다. 시도해 보겠습니다. –