SFOS-91: Abnormal TerminationRecords dont deserialize unless the far end can load every exception in the exception chain

Steve Loughran <[email protected]> Fri, 23 Mar 2007 10:24:14 +0000
Newsgroups gmane.comp.java.smartfrog.devel
Message-ID <[email protected]>
There's something I'd like to discuss to see how people react: bug 
SFOS-91, "Abnormal TerminationRecords dont deserialize unless the far 
end can load every exception in the exception chain"

http://jira.smartfrog.org/jira/browse/SFOS-91

when you create a TerminationRecord with a nested exception, that 
exception gets included in the serialization that gets sent over RMI. If 
the far end doesnt have every JAR for every fault that could be thrown 
by the far end, the file won't deserialize, so you can't find out why 
something terminated. You know that your database isnt there, but you 
don't know that you got a  com.mysql.MysqlException with something 
meaningful inside,

I've written the code to take a chained fault and if anything in the 
chain is not an instanceof SmartFrogException, convert it to 
SmartFrogExtractedException. Once you set the cause of an exception, you 
can't change it, which is why I have to recreate the whole tree, when 
needed:

http://svn.sourceforge.net/viewvc/smartfrog/trunk/core/smartfrog/src/org/smartfrog/sfcore/common/SmartFrogExtractedException.java?view=markup

the only place this is being used right now is TestBlockImpl and 
TestCompoundImpl, both of which implement an RMI method to return 
whatever exception caused the test to fail. I'm explicitly 
post-converting the TerminationRecord after the test run.

What I am wondering, is this:

1. should we *always* convert the exception chain in a termination 
record to a list of exceptions that we believe are terminatable

2. what breaks?

3. what exceptions should we leave alone? Right now I convert all that 
isnt instanceof SmartFrogException, but we could also expand this to 
include everything in a class under java.*, and maybe those javax.* 
packages built in to java1.4.

There's a risk of things breaking if they actually read in the term 
record and look for a specifically typed exception. Has anything other 
than the tests (that we can change) made use of this?

-steve

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV