7.5. JDBC-based CacheLoader

7.5. JDBC-based CacheLoader

JBossCache is distributed with a JDBC-based CacheLoader implementation that stores/loads nodes' state into a relational database. The implementing class is org.jboss.cache.loader.JDBCCacheLoader.

The current implementation uses just one table. Each row in the table represents one node and contains three columns:

FQN's are stored as strings. Node content is stored as a BLOB. WARNING: TreeCache does not impose any limitations on the types of objects used in FQN but this implementation of CacheLoader requires FQN to contain only objects of type java.lang.String. Another limitation for FQN is its length. Since FQN is a primary key, its default column type is VARCHAR which can store text values up to some maximum length determined by the database. FQN is also subject to any maximum primary key length restriction imposed by the database.

See http://wiki.jboss.org/wiki/Wiki.jsp?page=JDBCCacheLoader for configuration tips with specific database systems.