wamblee.org

Table of contents

Builtin Caches

Flexible JDBC Realm provides support for caching of authentication data through configuration of the fully qualified classname of a cache. Configuration properties for a cache are defined through configuration properties of Flexible JDBC Realm.

org.wamblee.glassfish.auth.cache.impl.NoAuthenticationCache

This is the default cache which does not do any caching at all. This can lead to a lot of database access. It does not have conrfiguration properties.

org.wamblee.glassfish.auth.cache.impl.SimpleExpiryCache

A simple cache with expiry. This cache has the following configuration properties:

Property Description
cache.timeoutSeconds Optional property for the time that information for a user will be cached in seconds. The default is 60. In case a value < 0 is passed, then entries in the cache will never expire.

This cache also provides a JMX interface. See the Javadoc for details.

Extendibility

Additional cache implementations can be provided by implementing the AuthenticationCache interface, putting it in a jar and adding the jar to the glassfish lib directory so flexible JDBC realm can find it. The last step is to configure fully qualified classname of your cache, see installation.

The Caching API has the following maven coordinates:

groupId artifactId
org.wamblee.glassfish flexiblejdbcrealm-cache