I should add that my current workaround is to have my datasource's initialize method simply wait in a loop, doing a JNDI lookup every few seconds, until JBoss gets around to binding the datasource to a JNDI name.
This doesn't seem like a very clean approach. Is it a hack, or is there no other way to accomplish what I'm after?
how did you declare your login module?
If you use the "JBoss beans" approach introduced in JBoss 5, a "depends" should be possible:
The "old" way of using "login-config.xml" does not provide this ability.
Hope this helps