Ok, no one has any opinions on the matter... I'll discuss with my self then. :-)
Another thought I have, and the one I will try to implement:
I'll cast any exceptions thrown in the Integration layer to my own unchecked exceptions, including a message code for i18n. I do not catch them in my Facade layer, so the Transaction can do its rollback (if needed). I'll create an aspect, wrapping any call to the facade from the presentation layer.
Code:
public aspect TranslateFromExceptionToResultObject {
pointcut facadeCall() :
call(ServiceResult+ com.my.package.facade.*.*(..))
&& within(com.my.package.client..*);
Object around() : facadeCall() {
Object res = null;
try{
res = proceed();
} catch(Throwable e) {
if(e instanceof MyRunTimeException) {
res = new ServiceResult(ServiceResultStatus.ERROR, e.getMessageCode());
} else {
res = new ServiceResult(ServiceResultStatus.ERROR, e.getMessage());
}
}
return res;
}
}
This ensures my presentationlayer will always get an object it can handle, I have a clean facade and service layer, without any TCF's and I can use Springs Declarative Transaction support without hassle.