>
> In many cases that a database operation fails the next layer just cares
> that it gets notified of the failure and logs it (you could also have
> subclasses of MyException that indicate more specific failure types).
> MyException is allowing other layers to be independent of the persistence
> implementation exceptions like SQLException.
>
Next layer faills too, doe's not it ? If you will handle MyExeption this
way in next layer you will log it twice and
It will dublicate code. I think It is better log all fatal exeptions in
single place, I prefer this way :
void register(MyObject value){
Connection connection = getConnection();
updateOrInsert(connection,value);
log.info(" registred " + value.getId() );
}
The last layer ( resource management ) logs all unhandled exeptions and
releases resources.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 2003.06.21
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]