JBoss JMS Queue standalone application

JBoss JMS Queue standalone application

In JBoss application server JMS is implemented in all version. Configuration is little different in different version of JBoss. In this tutorial we will configure and create JBoss JMS Queue standalone application where we will be sending message on the queue and will print message once its received.

Note: We will be using jboss-6.1.0.Final version for this demo. If you are using any other version please add JMS detonation using this tutorial

  • Configure JMS destination on JBoss.
  • Go to jboss-6.1.0.Final\server\default\deploy\hornetq\hornetq-jms.xml and below queue:

JBoss JMS Queue standalone application

  • Create maven project JBossJMS:

JBoss JMS Queue standalone application

 

  • pom.xml:

  • JBossJMSQueue.java:

Important: If you are running as standalone application you need below Jars in your class path which you will find in “jboss-6.1.0.Final\common\lib” folder:

JBoss JMS Queue standalone application

  • To keep process simple add all JBoss Jars in your class path. Right click project –> Properties –> Add Library

JBoss JMS Queue standalone application

JBoss JMS Queue standalone application

  • Now start the JBoss server. Go to jboss-6.1.0.Final\bin –> Double click run.bat to start the server. Once server is started run the queue. Right click JBossJMSQueue.java –> Run As –> Java Application you will see below output on console:

JBoss JMS Queue standalone application

  • For more information please visit JBoss documentation here

Leave a Reply

Your email address will not be published. Required fields are marked *