Results 1 to 2 of 2

Thread: Best Solutions for catching Translated Exception

  1. #1
    Join Date
    Aug 2007
    Posts
    9

    Cool 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. #2
    Join Date
    Aug 2007
    Posts
    9

    Default 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •