[Design of JBoss Identity] - Caching
by bdaw
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#4206907
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206907
15 years, 4 months
[Design of JBoss Identity] - Re: comments on IDM 1.0-alpha1.
by bdaw
"jeff.yuchang" wrote :
| 1. Currently, the idm module has two implementation out of box, one is db, the other is ldap. I am wondering will it be better if we split it to two modules, say idm-hibernate, idm-ldap etc. so that people can just use what they want.
|
The ldap implementation doesn't add any additional dependencies itself - it is plain JNDI. So now there would be quite minimal advantage when using plain LDAP scenario (no hibernate dependencies...). Still I think it is a good idea to split the modules for the future. Will benefit if we have more implementations.
anonymous wrote :
| 2. In the db scenario, I have found that we need to have the persistence.xml in the META-INF/ folder, and in the persistence.xml, we have listed a set of implementation classes. I am thinking that can we hidden those implementation classes to users somehow. such as we can have a default persistence.xml(or other name) that contains the inner implementation class in the idm-hibernate module. while for the users, they just need to configure the database connection.
|
Good point, also the database connection properties need to be placed outside then. Yesterday I converted hibernateIdentityStoreImpl to use Hibernate SessionFactory instead of JPA stuff and I may switch to hibernate configuration files.
Could you make jiras for those ideas and assign them to me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206899#4206899
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206899
15 years, 4 months
[Design of JBoss jBPM] - Re: db properties reorg
by tom.baeyens@jboss.com
"heiko.braun(a)jboss.com" wrote : Another requirement is to switch between hibernate managed connections (simple tests, jdbc properties) to container managed connections (intgeration tests, datasources).
|
that was the use case what i forgot
i don't like the current set up yet. i got the feeling that it must be possible to make it less complex.
but i'll give it some time to get used to it and then see where and how (if at all) things need to be improved.
one thing that i haven't figured out yet is the configuration variation for the pvm tests. in the pvm, we need a jbpm.cfg.xml which is almost as the full configuration file, but it should exclude the jpdl things (only one or two things).
i'm still chewing on how we can get to one unified configuration source for all modules... not trivial.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206896#4206896
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206896
15 years, 4 months