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.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206907#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...