Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #271244 +++ A recent change to the Javadocs in IService#initService brought up the fact that IService#initService may also initialize remote agents, miners or channels as part of its work -- that is, after the ConnectorService has connected a shared communication channel, initService() may perform additional work on the remote. The current API contract of IService#initService() does not throw any checked exceptions. This is problematic in the case where remote operations may be performed, since detection and proper reporting of errors to the user is awkward without exceptions. As per the Binary Compatibility Guide, adding checked exceptions to a method breaks contract compatibility and source compatibility, but does not break binary compatibility: http://wiki.eclipse.org/Evolving_Java-based_APIs_2#Evolving_API_interfaces_-_API_methods Since binary compatibility is not compromised, I'm in favor of adding throws SystemMessageException to IService#initService() in order to better handle exceptional conditions (such as remote service unavailable) during IService#initService(). There are other possible options to fix the problem (such as logging failures, or storing away exceptions and retrieving them via some new IService#getLastFailure() call), but to me these seem awkward compared to the small change of adding a checked exception to initService and thus making it behave as we think it should behave. Any thoughts ?
Should decide and fix this for M7 in order to properly fix bug 227135.
If we throw a SystemMessageException for IService.initService() do you think we should also throw a SystemMessageException for ISubSystem.initSubSystem()?
Created attachment 133144 [details] patch with initService() and initSubSystem() throwing SystemMessageException With this patch, the services and subsystems allow for a SystemMessageException to get propagated back to the caller of connect().
I've committed most of the changes to cvs. I wasn't able to commit DeveloperSubSystem from org.eclipse.rse.examples.tutorial. I get the following message when I try: The server reported an error while performing the "cvs commit" command. org.eclipse.rse.examples.tutorial: cvs [server aborted]: "commit" requires write access to the repository
Anna was able to commit the fix for the DeveloperSubSystem.