User List (Annotated)

This is a very simple user management app that leverages annotated Groovy classes as the Hibernate-managed entities. In this case, the annotations are the base JPA annotations, but the Hibernate extensions to JPA can be used as well.

There is no XML anywhere; Hibernate is entirely configured via setting properties on the plugin. In this case I'm doing it programmatically in Application.cfc, but in the real world ColdSpring would be a better solution.

The database connectivity is all provided by the CFML runtime's standard datasources. Just set the coldFusionDsn property on the plugin and it will take care of the rest (using the service factory which is supported by both ColdFusion and Railo).

If you prefer/require, Hibernate can still be configured using the standard hibernate.cfg.xml file, along with HBM files for individual entities. You can also supply database connection information in this way instead of using a CF DSN. You can even mix and match both forms of configuration.