[jboss-user] [JBoss jBPM] - Re: Remove or Delete User - Group from Identity store
hosierdm
do-not-reply at jboss.com
Tue Jul 18 01:52:24 EDT 2006
So first off, sorry for the delay...very busy with work stuff. Second, I'm not sure what you mean when you ask about using the identitySession to commit transactions. I call IdentitySession methods, that's it. Hibernate takes care of all that stuff in the background. I responded to the thread you referenced, but my response isn't much help right now.
Ok, here is what I did for deleting Users. I added a method called deleteUserByName(String ) to the IdentitySession class, which is as follows:
public void deleteUserByName(String userName) {
| User user = getUserByName(userName);
| session.delete(user);
| }
And here is the method I have in a class of mine where I call this:
public void deleteUser(String userName)
| {
| JbpmContext jbpmContext = _jbpmConfig.createJbpmContext();
| try
| {
| IdentitySession idSession = new IdentitySession(jbpmContext.getSession());
| idSession.deleteUserByName(userName);
| }
| finally
| {
| jbpmContext.close();
| }
| }
As for the cascade changes, give me a bit to do a diff, and then I'll post that information as well.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958656#3958656
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958656
More information about the jboss-user
mailing list