Connect Delphi and Free Pascal applications with Payara Server 4.1

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 MQ 5.1.1, the default message broker in Payara Server 4.1.

Part one: basic setup and test

System requirements

  • Payara Server 4.1 requires Java JDK 7 or later (the JAVA_HOME environment variable must point to the JDK directory)


Server configuration

  • run <inst>payara41glassfishbinasadmin start-domain to launch the server
  • run <inst>payara41glassfishbinasadmin jms-ping to initialize the JMS subsystem
  • edit <inst> and add these lines:
  • finally, run <inst>payara41glassfishbinasadmin 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).