1 Reply Latest reply on May 27, 2013 3:38 AM by mkouba

    @Vetoed for exception classes?

    juergen.zimmermann

      IMHO, @Vetoed is mainly designed to be used in JPA-based entity classes. On the other hand the exception classes are typically not @Inject-ed as CDI-managed beans.

      Is it a good practice to annotate most (or even all) exception classes with @Vetoed?

        • 1. Re: @Vetoed for exception classes?
          mkouba

          Hm, I think most of the checked exceptions usually don't have a constructor with no parameters - so they do not become CDI beans anyway (see the spec "3.1.1 Which Java classes are managed beans?"). Otherwise I would say it's a good practice as I don't see any good reason to have it managed.