The company I work for encountered this behaviour on JBoss 5 AS and logged a bug regarding it
It doesn't look like it has been prioritized yet. The behaviour on JBoss 4.2.3 works as expected BTW.
Mr. Bob Not, thank you very much! I didn't test with Jboss AS 4.x. I'm using only the 5.x version. Thanks again!