I have a Stateless Session
EJB which process creditcard authorization.
My requirement is to throw Exception ( for example SQLException if there is a database error) from my EJB public methods so that
java clients can catch exception and see the error messages and also I have to return an object which contains all other information about CreditCard Information.
I have to return this object even if there is a database error and I am throwing an exception for it...
so my question is, is there a way in Java to both throw an exception and return an object simultaneously ??? so that clients can catch exception and can recieve a return object...