3 Replies Latest reply on Nov 13, 2013 8:36 AM by Jozef Hartinger

    Public method not intercepted and return value not "bean validated"

    Juergen Zimmermann Master

      I'm having the following CDI-enabled bean. However, when createCustomer() invokes findCustomerByEmail, then the Log interceptor is not invoked and also the ConstraintViolationException is not thrown (when using an email so that null is returned by findCustomerByEmail). Any hint is appreciated!




      public class CustomerService implements Serializable {


         public Customer findCustomerByEmail(String email) {

            if (...)

               return null;


            return ...;


         public void createCustomer(Customer c) {

            Customer tmp = findCustomerByEmail(c.getEmail());  // ConstraintViolationException is not thrown,

                                                               // Log interceptor for findCustomerByEmail is not invoked