JBoss App 5.x comes with JBoss Messaging. but it doesn't prevent you from using other products IMO.
HornetQ can be used in other applications servers. We have provided our own JCA adapter.
We have basically tested it into JBAS only, but I have reports of an user using it for instance on OpenEJB. We should do some tests with other application servers before GA.
I would say JBoss Messaging is more dependent on JBAS due to the library dependencies. While HornetQ is totally independent.
You could have more information about this on www.hornetq.org