In EJB3 package (ejb3 extension) in META-INF folder is file "hibernate.properties" .
In this file you can instruct Jboss (Hibernate) how to automatically manage entity beans with setting of hibernate.hbm2ddl.auto property.
Create new empty tables on deploy (also Jboss start)
Update existing tables if possible, and leave data without change .
Create new empty tables on deploy (also Jboss start) and destroy on undeploy(also Jboss end).
If no hibernate.hbm2ddl.auto property exists (or is commented) then no changes to database are made with deploy/undeploy operation.
If in EJB3 file does not exist any hibernate.properties file (may be your situation with demos), then default settings from /var/jboss/server/all/deploy/ejb3.deployer/META-INF/hibernate.properties file is used.
Hope it helps.
Excellent works perfect.