-
Jun 9th, 2010, 04:29 AM
#1
How to intercept transaction proxy exceptions?
Hi all guys,
I'm fighting with the following problem.
I'm using Hibernate Validators to validate my beans, just before they are updated on the database to prevent sql constraint exceptions.
class User {
@NotNull
private String name;
@NotNull
private String surname;
...
}
In my service layer I use @Transactional annotation in the following way:
@Transactional
void updateUser(User user) {
userDao.updateUser(user);
}
and the class is also exposed as a CXF web service.
The problem is that the Hibernate validator exceptions are thrown in the Transaction Proxy (when the transaction is committed I think) and I can't catch those exceptions (they are thrown directly from the web service).
Is there any transaction exception handler that I can configure?
Do you have any advice about proxy exceptions handling?
Thanks in advance for help!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules