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>\payara41\glassfish\bin\asadmin start-domain to launch the server
  • run <inst>\payara41\glassfish\bin\asadmin jms-ping to initialize the JMS subsystem
  • edit <inst>\payara41\glassfish\domains\domain1\imq\instances\imqbroker\props\ and add these lines:
  • finally, run <inst>\payara41\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).



Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s