Did you read the pay docs, or just the free stuff? I recommend the pay doc. That said....
Please provide some more info regarding your problem, and we may be able to help.
What is the problem you are having?
Version of JBoss?
What loginmodule are using? Client loginmodule does 'lazy' authentication. The subject with the supplied login&password are tied to the client thread, and aren't used until you actually attempt to access a protected resource.