0 Replies Latest reply on Feb 4, 2009 6:53 AM by Boleslaw Dawidowicz

    Caching

    Boleslaw Dawidowicz Master

      I added simple org.jboss.identity.idm.impl.cache.JBossCacheIdentityStoreWrapper class. It provides caching using JBossCache by simply wrapping any IdentityStore implementation. Wrapper can be configured on the repository level:

      <repository>
       <id>Repo1</id>
       <class>org.jboss.identity.idm.impl.repository.FallbackIdentityStoreRepository</class>
       <external-config/>
       <default-identity-store-id>Hibernate Identity Store</default-identity-store-id>
       <default-attribute-store-id>Hibernate Identity Store</default-attribute-store-id>
       <identity-store-mappings>
       <identity-store-mapping>
       ...
       </identity-store-mapping>
       <identity-store-mapping>
       <identity-store-id>LDAP Identity Store</identity-store-id>
       <identity-object-types>
       <identity-object-type>IDENTITY</identity-object-type>
       ...
       </identity-object-types>
       <options>
       <option>
       <name>cache</name>
       <value>true</value>
       </option>
       <option>
       <name>cache.config-file</name>
       <value>src/test/resources/jboss-cache-config.xml</value>
       </option>
       </options>
       </identity-store-mapping>
       </identity-store-mappings>
       <options/>
      </repository>
      


      or:

      <repository>
       <id>Sample Repository </id>
       <class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
       <external-config/>
       <default-identity-store-id>LDAP Identity Store</default-identity-store-id>
       <default-attribute-store-id>LDAP Identity Store</default-attribute-store-id>
       <options>
       <option>
       <name>cache</name>
       <value>true</value>
       </option>
       <option>
       <name>cache.config-file</name>
       <value>src/test/resources/jboss-cache-config.xml</value>
       </option>
       </options>
      </repository>
      


      Main use case at the moment is to wrap LDAPIdentityStoreImpl. I will incorporate caching into this implementation later.