Announcement Announcement Module
Collapse
No announcement yet.
Best Solutions for catching Translated Exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Best Solutions for catching Translated Exception

    Hi,

    I am trying to put exception translation to work. I've found information in http://forum.springframework.org/showthread.php?t=34260
    but I am not understanding the solution, maybe because I am just to stupid.

    My scenario uses JSF Page -> Backing Bean -> DAO. I am trying to put a try/catch in backing bean (inside called method) but it is not able to catch any Exception at all. I am also using OpenEntityManagerInView.
    My DAO class is marked with @Repository and @Transaction, and as I said above, I would like to catch the exception in the Backing Bean.
    Exception is being translated correctly, I am getting a DataIntegrityViolationException, my only problem is that the Exception is not get by the bean, but throwed to the screen.

    I read about using Interceptor instead of tx-annotation, but I did not get the solution yet. Does it solve the problem about catching the exception? Are there more examples?

    Thanks in advance

  • #2
    Sorry, bad day

    I am now catching exception, but it was my mistake.




    Too much work and a Try catch in a wrong place.
    Sorry folks

    Comment

    Working...
    X