The instructions are in the 4.0.x docs (what's new): http://docs.jboss.org/jbossas/whatsnew40/html_single/
But they have an error. If you set tomcat's Java2ClassLoadingCompliance to false like it says things don't work. The 4.0.0 configuration has a "false" value, and that worked for me to bring 4.0.x to J2EE 1.4 compliance.
Also, I am not convinced that the compliance is 100%. Log4j messages that should be going to the server log are going to my application log.
Finally, when I tried this trick on 4.0.2RC1 I had a bad problems... I don't think that 4.0.2 is quite ready for prime time.
Ignore this line... Just setting "notify".