I managed to get it working by setting the default realm to jdbcRealm. I don't know why, but it seems that it was checking the user first with the realm I specified (jdbcRealm), then with the default realm.
Is this a normal behaviour or have I done something wrong?
[Message sent by forum member 'powerhouse_b' (powerhouse_b)]
http://forums.java.net/jive/thread.jspa?messageID=265351