JBoss.orgCommunity Documentation

Chapter 11. Examples

11.1. JMS Examples
11.1.1. Applet
11.1.2. Application-Layer Failover
11.1.3. Core Bridge Example
11.1.4. Browser
11.1.5. Client Kickoff
11.1.6. Client side failover listener
11.1.7. Client-Side Load-Balancing
11.1.8. Clustered Durable Subscription
11.1.9. Clustered Grouping
11.1.10. Clustered Queue
11.1.11. Clustering with JGroups
11.1.12. Clustered Standalone
11.1.13. Clustered Static Discovery
11.1.14. Clustered Static Cluster One Way
11.1.15. Clustered Topic
11.1.16. Message Consumer Rate Limiting
11.1.17. Dead Letter
11.1.18. Delayed Redelivery
11.1.19. Divert
11.1.20. Durable Subscription
11.1.21. Embedded
11.1.22. Embedded Simple
11.1.23. Message Expiration
11.1.24. HornetQ Resource Adapter example
11.1.25. HTTP Transport
11.1.26. Instantiate JMS Objects Directly
11.1.27. Interceptor
11.1.28. JAAS
11.1.29. JMS Bridge
11.1.30. JMX Management
11.1.31. Large Message
11.1.32. Last-Value Queue
11.1.33. Management
11.1.34. Management Notification
11.1.35. Message Counter
11.1.36. Message Group
11.1.37. Message Group
11.1.38. Message Priority
11.1.39. Multiple Failover
11.1.40. Multiple Failover Failback
11.1.41. No Consumer Buffering
11.1.42. Non-Transaction Failover With Server Data Replication
11.1.43. Paging
11.1.44. Pre-Acknowledge
11.1.45. Message Producer Rate Limiting
11.1.46. Queue
11.1.47. Message Redistribution
11.1.48. Queue Requestor
11.1.49. Queue with Message Selector
11.1.50. Reattach Node example
11.1.51. Replicated Failback example
11.1.52. Replicated Failback static example
11.1.53. Replicated multiple failover example
11.1.54. Replicated Failover transaction example
11.1.55. Request-Reply example
11.1.56. Rest example
11.1.57. Scheduled Message
11.1.58. Security
11.1.59. Send Acknowledgements
11.1.60. Spring Integration
11.1.61. SSL Transport
11.1.62. Static Message Selector
11.1.63. Static Message Selector Using JMS
11.1.64. Stomp
11.1.65. Stomp1.1
11.1.66. Stomp Over Web Sockets
11.1.67. Symmetric Cluster
11.1.68. Temporary Queue
11.1.69. Topic
11.1.70. Topic Hierarchy
11.1.71. Topic Selector 1
11.1.72. Topic Selector 2
11.1.73. Transaction Failover
11.1.74. Transactional Session
11.1.75. XA Heuristic
11.1.76. XA Receive
11.1.77. XA Send
11.1.78. XA with Transaction Manager
11.2. Core API Examples
11.2.1. Embedded
11.3. Java EE Examples
11.3.1. EJB/JMS Transaction
11.3.2. Resource Adapter Configuration
11.3.3. Resource Adapter Remote Server Configuration
11.3.4. JMS Bridge
11.3.5. MDB (Message Driven Bean)
11.3.6. Servlet Transport
11.3.7. Servlet SSL Transport
11.3.8. XA Recovery

The HornetQ distribution comes with over 70 run out-of-the-box examples demonstrating many of the features.

The examples are available in the distribution, in the examples directory. Examples are split into JMS and core examples. JMS examples show how a particular feature can be used by a normal JMS client. Core examples show how the equivalent feature can be used by a core messaging client.

A set of Java EE examples are also provided which need the JBoss Application Server installed to be able to run.

To run a JMS example, simply cd into the appropriate example directory and type ./build.sh (or build.bat if you are on Windows).

Here's a listing of the examples with a brief description.

To run a core example, simply cd into the appropriate example directory and type ant

Most of the Java EE examples can be run the following way. simply cd into the appropriate example directory and type mvn test. This will use Arquillian to run the Application Server and deploy the application. Note that you must have jboss AS 7 installed and the JBOSS_HOME environment variable set. Please refer to the examples documentation for further instructions.