[jboss-user] [JBoss jBPM] - setting user data

ricardomarques do-not-reply at jboss.com
Mon Jun 25 11:19:25 EDT 2007


Hi

I'm trying to set a user password, but for some reason. the data don't get saved. I'm wondering if i'm using this the correct way. Here's my code:


  | public void changePassword(String name, String newPassword) {
  |         
  |         User user = identitySession.getUserByName(name);
  |         
  |         if (user != null) {
  |             user.setPassword(newPassword);
  |             
  |             identitySession.saveUser(user);
  |             log.debug("password changed for " + name);
  |         }
  |         else {
  |             log.error("no such user: " + name);
  |         }
  | 
  |     }
  | 

I've tried also without the saveUser() and the result is the same.

I'm opening and closing the session like this:


  |  public void openSession() {
  |         this.jbpmContext = this.jbpmConfiguration.createJbpmContext();
  |         this.identitySession = new IdentitySession(jbpmContext.getSession());
  |         log.debug("session opened!");
  |     }
  |     
  |     public void closeSession() {
  | 
  |         this.identitySession.close(); 
  |         this.jbpmContext = null;
  |         
  |         log.debug("session closed!");
  |     }
  | 

Help?

I'm using jbpm 3.2 + jboss AS 4.0.5 + mysql 5

Thanks :)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057399#4057399

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057399



More information about the jboss-user mailing list