Globally configuring ErrorHandlerClass for an ADF application
I talked about customizing the DCErrorHandlerImpl in one of my old blog post http://www.jobinesh.com/2011/03/customizing-business-components-error.html. This custom ErrorHandlerClass is usually configured in DataBindings.cpx file. What if you have many projects and you want to configure it centrally in one place at application level. From release version 11.1.2.1.0 onward ADF supports configuration of ErrorHandlerClass in adf-config.xml (Thanks to Steve Muench who shared this tip). A sample adf-config.xml with custom error handler class is here:
<?xml version="1.0" encoding="windows-1252" ?> <adf-config xmlns="http://xmlns.oracle.com/adf/config" xmlns:config="http://xmlns.oracle.com/bc4j/configuration" xmlns:adf="http://xmlns.oracle.com/adf/config/properties" xmlns:sec="http://xmlns.oracle.com/adf/security/config"> <adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config"> <defaults changeEventPolicy="ppr" useBindVarsForViewCriteriaLiterals="true"/> <startup errorHandlerClass="view.util.CustomDCErrorHandlerImpl"> <amconfig-overrides> <config:Database jbo.locking.mode="optimistic"/> </amconfig-overrides> </startup> </adf-adfm-config> ... ... ... </adf-config>
Hello,
ReplyDeleteFirst congratulations for your post, it's very nice!
I've a ADF Mobile application and I want define a global exception handler but I don't know how!
I tried to configure like your article but when an exception is generated the exception handler class didn't invoke.
Do you have any idea to solve this question?
Regards,
Renan
Dear,
ReplyDeleteCan you post your class view.util.CustomDCErrorHandlerImpl?
See this link http://docs.oracle.com/middleware/1212/adf/ADFFD/bcadvgen.htm#ADFFD23461
ReplyDeletebtw, this for ADF Web
Dear Jobinesh,
ReplyDeleteAnd Global Error Handler to ADF Mobile, do you know how to do this?
I need to put this in my application. I have a big application based on the adf mobile.
I work with oracle spatial, mapviewer, oraclemaps, adf web, adf desktop. My company has projects that use oracle technology and we're Oracle's Partner.
If you can help me I'll be very happy. If necessary I can to pass my project by email for you.
Regards,
Renan