JBoss AS 5 was released way back in December 2008 (almost 10 years ago now) so you're a little late to the party.
JBoss Messaging stores all of its message data in the database so if you delete the tables then all of the message data will be lost. Therefore, I don't think you want to do that every time you restart the server.
You can find JBoss Messaging specific documentation here: JBoss Messaging 1.4 User's Guide.
Yes I am very late on jboss.
here is another question for you.
now we are moving to wildfly the new jbos version and our database is moving to exadata.
will there be any issue connectiong to exadata database.
please let me know ... if this is not the right place direct to right place .
JBoss Messaging is not used in Wildfly. The latest versions of Wildfly use the ActiveMQ Artemis broker which doesn't store messages in a database by default. Instead it uses a local journal (i.e. set of files).