Have you solved this authentication problem yet?
I'm having exactly the same problem and I would be very interested in your solution :-))
The JavaWorld article has an example that uses the DatabaseServerLoginModule. Get the article code from:
and run the buildDB target to populate the security database and then investigate the second example using
the example2-test0 target. Try changing that example to duplicate your security settings.