An example I can give is a project I was involved with using JBoss as the CA IdM application server. As such I will be addressing JBoss clustering in this entry.
JBoss uses a Hypersonic database to manage internal JMS data (JMS Queues). JBoss uses the JMS queues for tracking tasks and processes within the application. It is recommended to use a shared MS SQL database for the JMS database. There are documents available online which explain how to migrate from Hypersonic to MS SQL. In my example we opted to use the same MS SQL infrastructure used by Identity Manager to house the JMS database. In simplified terms, the steps to accomplish to clustering of IdM on JBoss is as follows:
1. Create a new SQL database (JBOSS_JMS)
2. Create a user/owner for this DB (jbossjms)
3. Migrate JBoss to SQL from the Hypersonic DB
4. Bring all services back up and test to ensure the migration was successful
5. Follow the procedures in the IdM documentation to configure JBoss clustering