Hi (again ;)),

about bean validation, i pushed another patch to start a support of the
appendix C of this spec to allow to validate parameters and returned values
(https://issues.apache.org/jira/browse/OPENEJB-1525).

example:

    @LocalBean
    @Stateless
    @Interceptors(BeanValidationAppendixInterceptor.class)
    public static class ValidationManager {
        @Min(0) public int valid(@Size(max = 1) @NotNull String
complicatedName, @Max(5) int ret) {
            return ret;
        }
    }

The interceptor can be set as system interceptor in openejb properties to
avoid to have to set it on all ejbs (it is done hacking BeanContext):
properties.put("org.apache.openejb.default.system.interceptors",
"org.apache.openejb.bval.BeanValidationAppendixInterceptor");.

- Romain

Reply via email to