you can write the flow
after the <login module>
<module-option name = "dsJndiName">java:/dataDS</module-option>
<module-option name = "principalsQuery">select Password from Users where UserId = ?</module-option>
dataDS is the datasource you define .
Users is table you define in your database ,because the application checks the user name and password.
Unfortunately this solution is not possible to use because the all EJB and
Web services must work in the same security domain.
My security domain uses my own login module and I
have to use this login module to authorize the Web service clients.
So the problem is how I have to configurate the jBoss security to check
authorization of Web service client by my own LoginModule?