You need to do the following:
In the topic descriptor (*-service.xml) you need to grant create access to the roles that will connect to durable topic.
You also need to create users for those roles. For the above example, users for the "vcust" role.
Then in the code, you need to provide the username/password when connecting to the topic, and you need to indicate that you want a durable subscription by calling Session.createDurableSubscriber (not sure if you need this, my code seems to work without it)
JBoss in Action has a an example. If you get the source code, first read jbia-src/index.html, then in jbia-src/ch08 you can run
ant target 05.