All examples that I found on the forums were showing how to connect using JMX; which I didn't really want to explore. I just needed a simple pure java object that will connect to hornetQ and do some managment operation. It took me a while to figure this out; so I decided to share this example in case anyone else needs to do the same.