|
The answer is, it depends 
The first paragraph you are quoting is about method constraints in general and as mentioned, just adding method constraints won't validate anything yet. You need some sort of intercepting technology.
The second paragraph talks about Hibernate Validator in combination with CDI. Provided you are using a Java EE 7 compliant container (eg. Wildfly), CDI and Bean Validation are automatically enabled and method validation will occur. The code which makes this happen is provided by Hibernate Validator as part of a CDI portable extension. The artifact is called hibernate-valiator-cdi.
If you are usinf CDI outside a Java EE container and want to use method validation you can achieve this by adding the named portable extension into your environment.
Does that make sense? I guess the docs need to be more specific about the type of CDI environment (EE container or not) and what Hibernate Validator brings to the mix.
|