If you declare a checked Exception it will be provided to the client.
RuntimeExceptions might be covered.
Is that what you meant?
My Primary requirement isto display appropriate message in Unicode languages for a single installation...this needs to be displayed Error / Exception Gentel messages raised on account of exceptions...
To achieve the same i have to customised the my own Exception class called "EjbException.java" which extends Exception calss
With this process I need the number raised due to Exception to return back to the Clinet . A Unique number for every exception's type is used as key value pair ..
The number is refrence to a Gentel Error message to the client User in appropriate Unicoded Fomat
1001 = Data Not Provided ( english )
1001 = xxxxxx( Spanish )
throws new EjbException(1001)
//ejb3 client (web / standalone /.....)
int Error = xyz XXXXXXX("????") // this should fetch the 1001
String message = xyz.getMessage(Error); // this should fetch the appropriate message and display
I use standard Java ResourceBundle for this, it support what you need.
The Exception include a key (in your case the number) and the native message.
The getMessage() or getLocalizedMessage() method checks the ResourceBundle and provide the localized message or the native one if nothing was found.