anchor.diff:  
   * https://github.com/wildfly/quickstart[wildfly]:
   ** check out, for example, https://github.com/wildfly/quickstart/tree/10.x/cdi-injection[cdi-injection] for a very simple use of CDI.
  +* https://github.com/javaee-samples/javaee7-samples[Java EE 7 Samples]
   * GlassFish comes with (mostly elaborated) samples (in the `samples` subdir of GlassFish), also available through https://svn.java.net/svn/glassfish-samples~svn/trunk/ws/javaee7/[svn].
   * To access the samples with Eclipse: I recommend to first git clone (or d/l) the repository, then use Eclipse Maven import.
   
  
positive.code: === Metamodel generator for typesafe JPA queries
  To generate the metamodel for use with typesafe Criteria queries, suffices to include a metamodel generator in your classpath (http://hibernate.org/orm/tooling/[doc]). Set it to `<provided>` scope as your code does not depend on it at runtime. 
  
  * For correct integration in Eclipse (neon, Java EE version), I have installed `Maven Integration for Eclipse JDT Annotation Processor Toolkit`, then in the project settings, Maven / Annotation Processing, selected: Automatically configure JDT APT. (Eclipse also has an internal option to generate the metamodel, see the project options at JPA / Canonical metamodel, but I don’t use that as it hinders compatibility of the project with other IDEs.)
  
  == JSF best practices
  [[multifield]]
  
negative.code: * To make sure they are unique, use a domain name you control as a `groupId` (possibly adding sub-parts to it), and invert it (https://maven.apache.org/guides/mini/guide-naming-conventions.html[source]).
  * Java conventions suggest to ensure uniqueness of your package names using the same rule (source: http://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html[tutorial], or see the non-normative note “Package names” in the http://docs.oracle.com/javase/specs/jls/se8/html/jls-6.html#jls-6.1[specs]).
  * Thus, I suggest naming your packages according to your `groupId` followed by a dot followed by your `artifactId`.
  * Hyphens are not allowed in package names, but underscores are (package names consist in dot-separated identifiers, see http://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.4.1[JLS 7.4.1]; identifiers consist in a `JavaLetter` then a set of `JavaLetterOrDigit`, a `JavaLetter` being a character for which `Character.isJavaIdentifierStart(int)` returns `true`, see http://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-Identifier[JLS Identifiers]; this includes the ASCII underscore (known as LOW LINE in Unicode, U+005F) but not the hyphen, see https://docs.oracle.com/javase/8/docs/api/index.html?java/lang/Character.html#isJavaIdentifierStart-int-[Character], http://www.fileformat.info/info/unicode/category/Pc/list.htm[Unicode], http://stackoverflow.com/a/32065830[SO]).
  * Thus, I suggest to transform hyphens used in `artifactId` into underscores when converting to package name. (Applying the conventional strategy for transforming domain names into valid Java identifiers.)
  * In Maven identifiers, avoid Java keywords and “words” consisting only of digits: they are legal in Maven but not convertible to Java identifiers.
  * Example: `groupId` = `io.github.oliviercailloux`; `artifactId` = `my-project-name`;  base package name = `io.github.oliviercailloux.my_project_name`.
  
  