Payara Server is an open-source application server derived from GlassFish Server Open Source Edition. If you need to exchange data between Delphi or Free Pascal code and Payara Server, you can follow these steps for a quick demonstration of the Habari Client for OpenMQ library from Habarisoft. This native library uses the platform-independent STOMP wire protocol for asynchronous, bidirectional message exchange with popular message brokers, including Open Message Queue (Open MQ), the default message broker in Payara Server 5.

Part one: basic setup and test

System requirements

  • Payara Server 5 requires Java JDK 8


Server configuration

  • run payara5\glassfish\bin\asadmin start-domain to launch the server
  • run payara5\glassfish\bin\asadmin jms-ping to initialize the JMS subsystem
  • edit payara5\glassfish\domains\domain1\imq\instances\imqbroker\props\ and add these lines:
  • finally, run payara5\glassfish\bin\asadmin restart-domain to restart the Payara Server

Launch clients

  • launch one or more instances of the HabariChat demo application and connect to the server on localhost with user admin and password admin


The Delphi application now can use the ExampleTopic as the ‘chat room’ for messages between all running instances (and, of course, allows also non-Delphi clients to receive and send messages within this chat room topic as well).


Habari Client libraries enable Object Pascal applications to take advantage of message broker / message queue technology – which is distributed, loosely coupled, reliable and asynchronous – to build integrated systems, using peer-to-peer and publish-subscribe communication models.