To run a stand-alone server, open up a shell or command prompt and navigate into the bin directory. Then execute ./run.sh (or run.bat on Windows) and you should see the following output
bin$ ./run.sh 15:05:54,108 INFO @main [HornetQBootstrapServer] Starting HornetQ server ... 15:06:02,566 INFO @main [HornetQServerImpl] HornetQ Server version 2.0.0.BETA5 (buzz-buzz, 107) started
HornetQ is now running. If any errors are displayed or if the server was not started properly, please refer to the troubleshooting guide for help
Both the run and the stop scripts use the config under config/stand-alone/non-clustered by default. The configuration can be changed by running ./run.sh ../config/stand-alone/clustered or another config of your choosing. This is the same for the stop script and the windows bat files.
To run HornetQ in JBoss AS 5, you need to create the AS 5 profiles for HornetQ first. Then run JBoss AS 5 with one these profiles. For example, to run JBoss AS 5 with a non-clustered HornetQ server, got to $JBOSS_HOME/bin directory and type:
bin$ ./run.sh -c default-with-hornetq 15:18:35,460 INFO [ServerImpl] Starting JBoss (Microcontainer)... 15:18:35,462 INFO [ServerImpl] Release ID: JBoss [The Oracle] 5.1.0.CR1 (build: SVNTag=JBoss_5_1_0_CR1 date=200904091504) ... 15:19:30,305 INFO [HornetQServerImpl] HornetQ Server version 2.0.0.BETA5 (buzz-buzz, 107) started ... 15:19:43,601 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.CR1 (build: SVNTag=JBoss_5_1_0_CR1 date=200904091504)] Started in 1m:8s:121ms