Tutorial: Delphi Integration with JBoss Application Server 6

This tutorial takes you through some of the basic steps of integrating Delphi applications and JBoss AS 6 with the help of Habari Client for HornetQ. This is an updated version of the tutorial of May 2010, tested with the final release, “JBoss AS 6.0.0.Final”.


To complete this tutorial, you need the software and resources listeds in the following list.

Broker Configuration

  1. Add the JBOSS_HOME environment variable which points to the JBoss installation folder.
  2. Open the file $JBOSS_HOME/server/default/deploy/hornetq/hornetq-configuration.xml
  3. To enable the Stomp acceptor, add the following code in the acceptors section of the file:
  <acceptor name="stomp">
    <param key="protocol"  value="stomp"/>
    <param key="port"  value="61613"/>
  1. Open the file $JBOSS_HOME/server/default/deploy/hornetq/hornetq-jms.xml
  2. Add a new queue with the name “TOOL.DEFAULT” (this is the default queue name used by the Habari ProducerTool and ConsumerTool):
  <queue name="TOOL.DEFAULT">
    <entry name="/queue/TOOL.DEFAULT"/>

Note: you can also create new queues and topics in the configuration file while the server is running, JBoss will automatically reload the file and apply the changes.

Start JBoss

You can now start JBoss AS 6:

  • $JBOSS_HOME/bin/run.sh

or (on Windows)

  • $JBOSS_HOME/bin/run.bat

With netstat /a you can verify if the Stomp acceptor is running on port 61613.

Running the Delphi Test

Now you are ready to produce and consume messages with Habari Client for HornetQ.

  1. start ProducerTool application to send messages
  2. start the ConsumerTool application to receive the messages

Verify the Message Queue Size

Navigate to the JBoss administration web app at http://localhost:8080 and go to the JMS Queue section. The statistics now should show 10 messages received and sent.