Hi,
I call ejb like this:
try {
MyBeanHome beanHome = .. //jndi lookup
MyBean bean = beanHome .create();
HashMap h = bean.chargeFee(data);
bean.remove();
} catch (
....
}
there are a lot exceptions: NamingException, CreationException, RemoteException, RemoveException (I don't have application exception).
I am thinking I catch the RemoveException first, since it happened after the chargeFee is called, and chargeFee is already been executed, so I deal it differently with the other Exceptions, since they heppend before or during the chargeFee executed, I treat it as not been executed.
Is it the right way to handle the exceptions? Thanks