I remembered i have run it while the previous one was still running. Then i killed the process id used in running JBOSS(not a graceful way to shutdown), and i think that left the ports open. So maybe my problem is how to manually close the ports?
Doing either a CTRL-C or killing the process (except for maybe a "kill -9") will cause JBoss AS to shut down gracefully, which includes closing the ports. For 'kill -9' the OS should be reclaiming the ports.