The general settings that we had for managing HornetQ using the core API are nearly the same for JMS settings. As we explained in Chapter 2, Setting Up HornetQ, HornetQ uses core APIs internally to manage the JMS requests so the only thing that changes is how to call the management API in the correct way.
So we are now ready to re-code the previous example in the JMS dialect only to underline the differences.
Before doing anything we need to create the queue used for testing and to tell HornetQ how to treat the security of the management queue:
Fire up your preferred text editor and open the
hornetq-configuration.xml
file located in theHORNETQ_ROOT\config\stand-alone\non-clustered
folder, and add the following tag into the<security-settings>
tag:<security-setting match="jms.queue.hornetq.management"> <permission type="manage" roles="guest" /> </security-setting>
The lowest trusted role of security is the guest role. In this case...