A: There are plenty of examples in the jboss testsuite.
This is available through CVS.
checkout "jboss-all" for everyting in jboss.
checkout "testsuite" for just the testsuite.
Or use sourceforge's web interface.
Cannot compilte it...
I never get problem with all Apache project using their Ant, but until now none of the source code of Jboss except the jboss-all can be compiled by me.
I think you need ant 1.4 for building.
There is a complete application with a lot of examples that runs on jboss and mySQL. Download it from https://sourceforge.net/projects/smalleb/
after unzipping the file, follow the instructions on how to install the application. (You need some familiarity with jboss and mysql to run the example).