Of course, I include this exception in the javadoc throws-tag in Data. Should I also include it in the throws-tags of the DBAccess and RemoteDBAccess interface?
How can I argue that I anticipate this exception at the business layer without having mentioned it at the DBAccess interface?
1. As your ConnectionFailsException is a sort of "system" exception (in the EJB sense: unrecoverable), why should your GUI layer test for the cause's cause? In your second code exrcept, cannot you simply replace "IOException" by "ConnectionFailsException"? (for all connection failures, whatever the cause, you'll have to close the application, right?).
2. That's what an EJB container does to send any system exception to a remote client, so it cannot be so bad...
Could you hold this kitten for a sec? I need to adjust this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton