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 remote communication with ejbs, if (!Util.isLocal(this)) { }
else //if local communication with ejbs {
try { //some exception occurs... } catch (Throwable ex) { //The throwable "ex" which is being used to make a copy has chained tracebacks. //But now, the below statement is creating a copy of "ex" with all the tracebacks being set to null in the chain!
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); } } }