Skip to end of metadata
Go to start of metadata

FAQ

Mod4j one-to-many associations

Use bidirectional one-to-many associations, else problems may occur with not-null foreign key constraints, see MODFORJ-133 and Hibernate.

Enable trace logging: entry/exit/execution time

The generated Spring configuration of mod4j defines two aspects that intercept every Dao, DomainService and LocalService. The aspects can log the entry/exit and execution time of the service methods, like so:

In order to enable this logging, configure the logging framework you're using (e.g. Log4j, SLF4J) to log at trace level for the logger name of your service class. For instance, when you're using log4j, add the following to your log4j.xml:

  • No labels