Spring makes SQL error codes redundant
The beauty of Spring's DataAccessException hierarchy is that it provides a handy abstraction from the vendor-specific error codes reported by different JDBC drivers. Your "tier above the service tier" only needs to check which specific subclass of DataAccessException has been thrown; it doesn't know or care which db product is actually being used.
Originally Posted by gdboling
If you wanted to retain your PersistenceException class, perhaps you could modify its constructor (or its factory, if it has one) to take a DataAccessException as a parameter (at which point it could do whatever it needed with it).
"Now is the EJB of our discontent made glorious Spring"