1 Reply Latest reply on May 14, 2007 8:51 PM by Peter Johnson

    jboss  login    DatabaseServletLoginModule  Jboss 4.0.5.GA

    dreu zel Novice

      I'm trying to use Mysql als login database but i run into sevral problems.

      1) my roles database is composed of 2 items,
      --MainFunction related(say default roles) and person relates(roles)
      my role file is a union of 2 queries connected with a variable.
      doing so I select 3 Coloms instead of 2 Coloms, (RoleID, RoleGroup, a bogus one)

      this seems to lock up the DatabaseServletLoginModule
      any idea's on how to solve this


      Query:
      <module-option name = "rolesQuery">
      SELECT allow as ROLEID, Role as RoleGroup ,@f:=at.Func FROM authorize ah,authenticate at
      WHERE at.user_name=ah.user_name
      AND (at.user_name=?) AND (at.Domain='domain')


      union select allow as ROLE, Role as RoleGroup , 'add' FROM authorize as ah1 WHERE ah1.user_name=@f </module-option>
      </login-module>



      Alternatively I had a look in using a stored procedure to add a kind of logging on roles access and doing the above in a stored procedures.


      the DatabaseServletLoginModule does not seem to like store procedures either.


      query:
      "rolesQuery"> call Roles(?)</module-option>

      Any idea's on how to solve this


      Thanks in advancce