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
- Payara Server 4.1 requires Java JDK 7 or later (the JAVA_HOME environment variable must point to the JDK directory)
- download and extract Payara Server 4.1
- download and extract Habari Client for OpenMQ demo applications
- 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\config.properties and add these lines:
imq.bridge.admin.user=admin imq.bridge.admin.password=admin imq.bridge.activelist=stomp imq.bridge.enabled=true
- finally, run <inst>\payara41\glassfish\bin\asadmin restart-domain to restart the Payara Server
- 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).