|
Oracle Fusion Middleware Java API Reference for Oracle Event Processing for Oracle Java Embedded 11g Release 1 (11.1.1.7) E39906-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Service for providing custom fault handlers.
When processing events in the context of Java code, such as it is the case for custom adapters event beans, and general beans, a developer can always make use of Java's exception handling mechanism (i.e. try-catch) to treat event processing errors. However, there are cases when it is not possible to do so. For example, this is the case if the error occurs within a processor's query (e.g. CQL), or if the error occurs in a channel's background thread. Fault handlers allow a developer to provide Java code for handling these situations where normally the developer cannot use Java's try-catch for handling errors that occur during the event processing flow.
The fault handler service must be registered in the OSGi service registry using the following service properties: application.identity
, stage.identity
. These properties identify where the handler is attached. For example, use the following declarative code to associate a fault handler to a processor called 'proc' in the EPN of an application called 'helloworld':
<osgi:service interface="com.bea.wlevs.ede.api.FaultHandler"> <osgi:service-properties> <entry key="application.identity" value="helloworld"/> <entry key="stage.identity" value="proc"/> </osgi:service-properties> <bean class="mypackage.MyFaultHandler"/> </osgi:service>
EventProcessingException
Field Summary | |
static java.lang.String |
APP_ID Use this mandatory service property to specify target application. |
static java.lang.String |
STAGE_ID Use this mandatory service property to specify target stage. |
Method Summary | |
void |
handleFault(java.lang.Throwable fault, java.lang.String[] catchers) This method is called-back informing handler of a fault that happened while processing an event, or a batch of events, allowing client to provide custom handling of faults. |
Field Detail |
public static final java.lang.String APP_ID
public static final java.lang.String STAGE_ID
Method Detail |
public void handleFault(java.lang.Throwable fault, java.lang.String[] catchers) throws java.lang.Throwable
catchers
specifies potential upstream event sources that receives the fault in case it is not handled. In case of a concurrent channel or a heart-beat CQL thread, there are no upstream sources and so this is an empty array.EventProcessingException
, or even a JVM Error.fault
- EventProcessingException or JVM errorcatchers
- Name of upstream event sources that potentially may receive fault if not handled.
|
Copyright © 2007, 2013 Oracle and/or its affiliates. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |