0 Replies Latest reply on Dec 1, 2013 2:05 PM by Stephen Agneta

    How to create and configure an IdentityManager for a specific Realm

    Stephen Agneta Newbie

      Hello!

         I'm using the latest PicketBox with PicketLink extensions and I have hit a bit of a wall. I want to use multiple IdentityManagers each configured to use the same Database Schema but each initialized/configured for a different PicketLink Realm. I don't know how to actually configure seperate realms thus I get the following exception every time I create an IdentityManager.forRealm(...):

       

      Caused by: java.lang.SecurityException: The specified realm 'TestRealm' has not been configured.

      at org.picketlink.idm.internal.DefaultIdentityManager.getContextualStoreForFeature(DefaultIdentityManager.java:635)

      at org.picketlink.idm.internal.DefaultIdentityManager.getContextualStoreForFeature(DefaultIdentityManager.java:627)

      at org.picketlink.idm.internal.DefaultIdentityManager.add(DefaultIdentityManager.java:227)

       

       

      How do I programmatically (or otherwise) initialize an IdentityManager for a specific realm?

       

      Thanks,

      Steve