Ralf Wunsch wrote:
> 
> 

> We are starting a new EAI project. At this time ServiceMix is our choice
> for the implementation plattform. We have strong requirements for
> monitoring and control issues. At this one aspect is the handling of
> unexpected errors. For this reason i have implemented the following error
> handler solution.
> 

> 

> 

> The error handling solution delegates errors or faults detected in
> analysis of the MessageExchange objects to an ErrorHandler implemented as
> XBean. This bean is used by an ErrorHandlerComponent (a JBI component
> embedded in the flow) or by the JBIContainer (the centralized way) or
> both.
> 

> 
http://www.nabble.com/file/290/error-handler-embedding.png 

> 

> The ErrorHandler can cancel transactions and stop the container or the
> source component (all cofigurable). Furthermore it's possible to route the
> error or fault messages and the actuating message to a configurable
> target. In this case ist possible to embed one or more
> ErrorHandlerComponents into the flow.
> 

> 
http://www.nabble.com/file/291/error-handler-flow.png 

> 

> Such an ambedded ErrorHandlerComponent borrowed by the EIP WireTap ensures
> that the rerouted message from the source will be in a well know format
> (the centralised approach can't accomplish this). The embedded and the
> centralized approach can be used in combination. For synchronization the
> ErrorHandlerComponent sets a Property on the outgoing MessageExchange and
> the ErrorEventListener does nothing as long as this property can be found
> in the MessageEchange which signals a fault or an error.
> 

> 

> A sample configuration...
> 

> 

> <bean id="errorHandler"
>       class="de.eval.eai.error.DefaultErrorHandler">
> </bean>
> ...
> <bean id="errorHandlerConfig"
>       class="de.eval.eai.error.ErrorHandlerConfig">
>   <property name="shutdownOnFault" value="true" />
>   <property name="rollbackOnFault" value="false" />
> </bean>
> ...
> <test:container id="jbi" 
>                useMBeanServer="true"
>                createMBeanServer="false"
>                dumpStats="true"
>                statsInterval="10"
>                errorHandler="#errorHandler"
>                errorHandlerConfig="#errorHandlerConfig">
> ...
>   <sm:activationSpecs>
> ...
>     <sm:activationSpec componentName="errorHandler">
>       <sm:component>
>         <eai:component>
>           <eai:endpoints>
>             <eai:errorHandler service="errorHandler"
> endpoint="endpoint">
>               <eai:target>
>                 <eai:exchange-target service="transformer" />
>               </eai:target>
>               <eai:disqualifyTarget>
>                 <eai:exchange-target service="failedQueue" />
>               </eai:disqualifyTarget>
>               <eai:errorTarget>
>                 <eai:exchange-target service="errorQueue" />
>               </eai:errorTarget>
>               <eai:faultTarget>
>                 <eai:exchange-target service="faultQueue" />
>               </eai:faultTarget>
>               <property name="shutdownOnFault" value="true" />
>               <property name="rollbackOnFault" value="false" />
>             </eai:errorHandler>
>           </eai:endpoints>
>         </eai:component>
>       </sm:component>
>     </sm:activationSpec>
> ...

> 

> 

> Two questions:
> 

> 

> Ist this a accurate ServieMix way (in accordance with the ideas of
> ServiceMix)?
> 

> 

> Is it on behalf of the project or the communitiy to reuse this solution?
> 

> 

> Thanks,

> Ralf Wunsch
> 

> 

-- 
View this message in context: 
http://www.nabble.com/Declarative-Exception-Handling-in-ServiceMix-tf2161788.html#a6658179
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Reply via email to