2 Replies Latest reply on Jun 21, 2007 3:46 AM by changemylife

    I have a problem that need help!!!

    changemylife

      Hi all!

      I have a problem when I authenticate the user. I use JBoss-4.0.5.GA, EJB3.0. I use the DatabaseServerLoginModule to authenticate a user. Here, I only test isCallerInRole method to receive true or false.
      The first, when I run my app (example: username is Jack that has role is doctor and nurse):

      .....
      LoginContext lc = new LoginContext("client-login", new DefaultCallbackHandler());
      lc.login();
      Methods mth = (Methods)ctx.lookup("MethodsBean/remote");
      boolean t = mth.callerIsRole("doctor");
      System.out.println(t); ----> t=true !! (JBoss server print "True")
      lc.logout();

      After, I edit database in mySQL(delete a role doctor). And run my app abow, but Jboss server still print "True" ---> (I think after I call lc.logout(), JBoss will remove principals of user Jack.).
      Please help me !!!