Dec 1st, 2006, 06:22 AM
OK, see what your saying. One way of doing it would be to decide on a general set of exceptions and the related messages. You could then create an abstract bean and a bean that uses this as the parent for each service. You then inject in the messages for each type of exception. So in the user service aspect objectNotFound=error.user.not.existing, in role service aspect objectNotFound=error.role.not.existing. If there are exceptions specific to the service you can then subclass the base aspect.
Originally Posted by axxa
It just means that for the services that throw general exceptions theres not much to do. For the ones that do something specific theres a lot less to do.
One thing you might have to think about is transactions. If your exceptions aren't runtime your going to have to configure what triggers a rollback etc....