Because this class performs its own Realm and Permission checks, and these can happen frequently enough in a production application, it is highly recommended that the internal User {@link #getRoles} collection be cachedin a 2nd-level cache when using JPA and/or Hibernate. The hibernate xml configuration for this sample application does in fact do this for your reference (see User.hbm.xml - the 'roles' declaration).
|
|
|
|
|
|
|
|
|
|
|
|
|
|