I have observed that there are lot of users who asks questions on OTN
and have problem in designing the custom generic exception handling
framework. So in this and next some of the posts I will be describing
how we can lay down a generic way to report custom exceptions to the
page. These custom exceptions may be mostly for Business Specific errors
for which we need to display a custom user friendly message on the page
to the user.
In this post we will be seeing how we can customize
the error on Model layer and take error messages from a resource bundle
defined in the application.
Lets get started. We will first create
a generic framework project where we will add exception handling
related classes. We give it a name as FrameworkUtil. Framework util
project will be dependent on model project from where custom Exceptions
will be thrown in the enterprise applications.
First lets set up FrameworkUtil project - ADF Model Project
an ADF Model Project with below package structure. Added a resource
bundle ErrorBundle.properties which will be having all the Business
Errors which can be thrown from the applications model layer. These
errors will be in key value pairs in Error properties file. Read the complete article here.
WebLogic Partner Community
For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.
Blog Twitter LinkedIn Forum Wiki