The whole problem was that if we set the
option in jbosscmp-jdbc.xml the the tables created by the container are of type MyISAM... and MySql supports transaction only on Tables of type InnoDB... so if you change the type of your tables to InnoDB everything should work fine.
I think there is an option somewhere to make sure that the tables created are of the type InnoDB maybe in conf/standardjbosscmp-jdbc.xml or somewhere.
Anyone aware of this ?
Thanks to Anubha for the solution and to Siddharth for his help.
Thanks for the answer. A possible solution is to start the MySQL server with option --default-table-type=InnoDB. By default the MySQL server uses MyISAM for table type and starting the server with this option changes the default type to InnoDB. I tried this and the rollback worked fine.