How to Join Payara Micro Instances to the Data Grid in the Admin Console

Payara

Payara Micro instances can join a cluster automatically. They could also join the Domain Data Grid as well as standalone Payara Server instances. In this blog, I explain how to join Payara Micro instances to the Data Grid in the Admin Console.

Prerequisites

First, we need to run the Payara Server Domain Administration Server (DAS) before joining Payara Micro instances. In this case, we assume that DAS is on dashost.

$ ./asadmin start-domain

The Hazelcast version of all instances in Data Grid must be same. If it is different, Hazelcast denies joining the instances to the cluster.

To avoid incompatibility issues, we should also use the same version of Payara Server and Payara Micro, but it’s not required.

Join a Payara Micro Instance to Data Grid

To join a Payara Micro instance to Data Grid, run Payara Micro with “–clustermode” option as follows:

$ java -jar payara-micro-5.193.1.jar --clustermode domain:dashost:4900

In default, “–clustermode” option is set as “multicast” for joining with a Payara Micro cluster automatically. We need to set the mode to “domain” and specify the DAS’s hostname and its Hazelcast listening port (4900 in default) for joining to Data Grid. Regarding the other options, we would set them (e.g. “–deploy”, “–autobindhttp”) on demand as usual.

When the Payara Micro instance is running, the status is listed on “Data Grid Instance” page in Admin Console (figure 1). We could confirm its location, listen port, deployed applications and other information.

Data Grid Instances Page
Figure 1. List of Payara Micro Instances (on "Data Grid Instances" Page)

 

Note: Payara Micro Instances couldn’t join to any Deployment Groups. Their configuration is independent from other instances (either Payara Server or Payara Micro).

Send asadmin Command to Payara Micro Instances

We could send asadmin command to Payara Micro instances on Data Grid using Admin Console or asadmin command on DAS.

Deploy an Application to Payara Micro Instances

Payara Micro instance is usually started with applications and we couldn’t deploy or undeploy other applications while it’s running. However, to send asadmin command from DAS, we could deploy applications to Payara Micro instances which is still running.

To deploy an application, choose the target from the list of Payara Micro instances and send “deploy” asadmin command as follows:

deploy /path/to/application

Note: The application should exist on the host which the instance is running.

For example, in Figure 2, I send “deploy” command to a Payara Micro instance (“Crazy-Lionfish”) to deploy “clusterjsp-1.1.war” application, and then its result is as figure 3.

Send deploy command to Payara Micro Instance
Figure 2. Send "deploy" command to Payara Micro instance
Result of sending Deploy command to Payara Micro Instance
Figure 3. The result of sending "deploy" command to Payara Micro instance.

Stop Payara Micro Instances

We could shutdown Payara Micro instances to send asadmin command from DAS.

To stop the instances, choose the target from the list of Payara Micro instances and send “stop-domain” asadmin command as follows:

stop-domain

For example, in figure 4, I send “stop-domain” command to both Payara Micro instances (“Bright-Dogfish” and “Crazy-Lionfish”) to stop them, and then its result is as figure 5. (To refresh the page, once select another tab and select it again.)

Send "stop-domain" command to Payara Micro instances
Figure 4. Send "stop-domain" command to Payara Micro instances
Result of sending "stop-domain" command to Payara Micro instances
Figure 5. Result of sending "stop-domain" command to Payara Micro instances

Control Payara Micro and Payara Server Instances in the Domain Data Grid with the Admin Console

We could join Payara Micro instances to the Domain Data Grid as well as standalone Payara Server instances, and control them in Admin Console to send asadmin commands.

 

 

Comments (0)

Post a comment

Your email address will not be published. Required fields are marked *

Payara needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Legal & Privacy Policy.

Related Posts

payara qube logo 5 minutes
Payara

Payara Cloud Is Now part of Payara Qube family of Unified Platforms for Enterprise Java

Payara Cloud is becoming part of Payara Qube family of Java application deployment runtimes. This move reflects how the […]

Payara promotional graphic showing transition from Spring to Jakarta EE, including technology logos, a code icon and arrows leading from Spring to Jakarta EE. 6 minutes
Jakarta EE

From Spring Boot To Jakarta EE 11: How Payara Starter Eases The Transition

If you’ve been living in the Spring ecosystem, you’re used to fast project setup. Spring Initializr gives you a […]

Promotional graphic for a podcast episode titled “Why Open Source is the Future of Business Innovation - A conversation with Arun Gupta”. The podcast is hosted by Payara Community. The right side features a photo of the speaker, Arun Gupta, labeled as a “VP, Developer Experience at JetBrains”. The design uses dark blue and teal backgrounds with coral and fish illustrations. 2 minutes
Community

Payara Podcast – Why Open Source is the Future of Business Innovation – A Conversation with Arun Gupta

Open source is no longer a developer-only concern — it’s at the heart of how modern businesses innovate, build […]