Ok, i've committed an API/SPI for transactional IDM and added it to my
pull request. It would be cool to get some approval for this very very
soon. Not necessarily for pull request, but the actual user-facing API.
A comittement to get it working within 2.5. I'd like to start using
it in my application - yesterday...
Also, this only works for JPA at the moment. It would probably take
some work to get it to work for LDAP and File store. I'd be willing to
work on that too as long as this gets approved.
Here's what it looks like:
IdentityContextFactory factory = new DefaultIdentityContextFactory(config);
IdentityContext ctx = factory.createIdentityContext();
ctx.getTransaction().begin();
Realm partition = ctx.findRealm("myRealm");
IdentityManager idm = ctx.createIdentityManager(partition);
...
ctx.getTransaction().commit();
ctx.close();
factory.close();
UnitTest:
https://github.com/patriot1burke/picketlink/blob/master/modules/idm/tests...
API:
https://github.com/patriot1burke/picketlink/blob/master/modules/idm/api/s...
https://github.com/patriot1burke/picketlink/blob/master/modules/idm/api/s...
https://github.com/patriot1burke/picketlink/blob/master/modules/idm/api/s...
SPI:
https://github.com/patriot1burke/picketlink/blob/master/modules/idm/api/s...
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com