JBoss.orgCommunity Documentation
There are two ways to use the jboss idm:
Use it as the embedded way
Deploy it into the container (JBoss AS5), and then all other projects can use it by getting IdentitySessionFactory from JNDI.
For the 1st case, users need to use the API to start the IdentitySessionFactory, and then use it. The code is as following, which you can find on the example module.
IdentitySessionFactory identitySessionFactory = new IdentityConfigurationImpl(). configure(new File("src/test/resources/example-db-config.xml")).buildIdentitySessionFactory(); IdentitySession identitySession = identitySessionFactory.createIdentitySession("realm::JBossIdentityExample_SampleRealm");
And then use the IdentitySession to do the operations etc. So it is very easy to use. We will look closer at the second scenario in the next chapter