Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Transactional services / Spring integration

Service classes or methods should be marked @Transactional to provide access to the underlying Hibernate Session / SessionFactory.

NamedQuery

Frequently executed HQL queries should be specified in @NamedQueryS on the relevant persistent entity/bean. The hibernate DAOs then reference the appropriate NamedQuery within their methods.

Useful tools

To run HQL queries and inspect the hibernate setup within Eclipse you can install the hibernate tools Eclipse plugin from JBoss by adding this update site to your Eclipse plugins registry (under Help -> Software Updates) - http://download.jboss.org/jbosstools/updates/development

...