This is a peculiar problem where in the websphere created stub file for my stateless session ejb is creating a copy of my app's exception(which has chained backtraces due to exception chaining)[i believe that it is doing this for portability purposes] and setting those backtraces to null, so that by the time i catch this exception in the web tier, i have no stack trace!
In the stub file for my stateless session ejb auto-generated by websphere 5.1, inside the business method, Also, am using Local Communication, so the else gets executed.
if (exCopy instanceof myappException) { throw (myappException)exCopy; // throwing the copy with the tracebacks set to null to the web tier! } throw Util.wrapException(exCopy); } finally { _servant_postinvoke(so); } } }
//Inside the business implementation class for my stateless session ejb, public mybusinessmethod () throws myappException{
try { //some exception occurs....
} catch (Exception e) { throw new myappException(e); } }
So, how to preserve my backtraces from being set to null by websphere's generated stub files and pass them to the web-tier??