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 Load-Balancing
11.1.7. Clustered Durable Subscription
11.1.8. Clustered Grouping
11.1.9. Clustered Queue
11.1.10. Clustered Standalone
11.1.11. Clustered Static Discovery
11.1.12. Clustered Static Cluster One Way
11.1.13. Clustered Topic
11.1.14. Message Consumer Rate Limiting
11.1.15. Dead Letter
11.1.16. Delayed Redelivery
11.1.17. Divert
11.1.18. Durable Subscription
11.1.19. Embedded
11.1.20. Embedded Simple
11.1.21. Message Expiration
11.1.22. Failover Manual Stop
11.1.23. HTTP Transport
11.1.24. Instantiate JMS Objects Directly
11.1.25. Interceptor
11.1.26. JAAS
11.1.27. JMS Bridge
11.1.28. JMX Management
11.1.29. Large Message
11.1.30. Last-Value Queue
11.1.31. Management
11.1.32. Management Notification
11.1.33. Message Counter
11.1.34. Message Group
11.1.35. Message Group
11.1.36. Message Priority
11.1.37. Multiple Failover
11.1.38. Multiple Failover Failback
11.1.39. No Consumer Buffering
11.1.40. Non-Transaction Failover With Server Data Replication
11.1.41. Paging
11.1.42. Pre-Acknowledge
11.1.43. Message Producer Rate Limiting
11.1.44. Queue
11.1.45. Message Redistribution
11.1.46. Queue Requestor
11.1.47. Queue with Message Selector
11.1.48. Reattach Node example
11.1.49. Request-Reply example
11.1.50. Scheduled Message
11.1.51. Security
11.1.52. Send Acknowledgements
11.1.53. Spring Integration
11.1.54. SSL Transport
11.1.55. Static Message Selector
11.1.56. Static Message Selector Using JMS
11.1.57. Stomp
11.1.58. Stomp Over Web Sockets
11.1.59. Symmetric Cluster
11.1.60. Temporary Queue
11.1.61. Topic
11.1.62. Topic Hierarchy
11.1.63. Topic Selector 1
11.1.64. Topic Selector 2
11.1.65. Transaction Failover
11.1.66. Transactional Session
11.1.67. XA Heuristic
11.1.68. XA Receive
11.1.69. XA Send
11.1.70. 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. HAJNDI (High Availability)
11.3.3. Resource Adapter Configuration
11.3.4. Resource Adapter Remote Server Configuration
11.3.5. JMS Bridge
11.3.6. MDB (Message Driven Bean)
11.3.7. Servlet Transport
11.3.8. Servlet SSL Transport
11.3.9. 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 ant deploy. This will create a new JBoss AS profile and start the server. When the server is started from a different window type ant run to run the example. Some examples require further steps, please refer to the examples documentation for further instructions.