Most asked top Interview Questions and Answers | Online Test | Mock Test
Education platform for interview prep, online tests, tutorials, and live practice

Build skills with focused learning paths, mock tests, and interview-ready content.

WithoutBook brings subject-wise interview questions, online practice tests, tutorials, and comparison guides into one responsive learning workspace.

Search the library
Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

WithoutBook Forum

Ques. Create cluster in local glassfish

- Hi,
I want to create cluster to pass my load on different clusters. Please let me know how can I do that in my windows?
Thanks.

Posted on Jul 31, 2014 by Abhijit
Ans. Once Glassfish DAS starts you can create multiple clusters in your local glassfish:

Commands:

Create Cluster:

$ bin/asadmin create-cluster cluster1
Command create-cluster executed successfully.

Create Instance (instance1):

$ bin/asadmin create-local-instance --cluster cluster1 instance1
Rendezvoused with DAS on localhost:4848.
Port Assignments for server instance instance1:
JMX_SYSTEM_CONNECTOR_PORT=28686
JMS_PROVIDER_PORT=27676
HTTP_LISTENER_PORT=38080
ASADMIN_LISTENER_PORT=24848
JAVA_DEBUGGER_PORT=29009
IIOP_SSL_LISTENER_PORT=23820
IIOP_LISTENER_PORT=23700
OSGI_SHELL_TELNET_PORT=26666
HTTP_SSL_LISTENER_PORT=28181
IIOP_SSL_MUTUALAUTH_PORT=23920
Command create-local-instance executed successfully.

Create Instance (instance2):

$ asadmin create-local-instance --cluster cluster1 instance2
Rendezvoused with DAS on localhost:4848.
Using DAS host localhost and port 4848 from existing das.properties for node
localhost-domain1. To use a different DAS, create a new node using create-node-ssh or
create-node-config. Create the instance with the new node and correct
host and port:
asadmin --host das_host --port das_port create-local-instance --node node_name instance_name.
Port Assignments for server instance instance2:
JMX_SYSTEM_CONNECTOR_PORT=28687
JMS_PROVIDER_PORT=27677
HTTP_LISTENER_PORT=38081
ASADMIN_LISTENER_PORT=24849
JAVA_DEBUGGER_PORT=29010
IIOP_SSL_LISTENER_PORT=23821
IIOP_LISTENER_PORT=23701
OSGI_SHELL_TELNET_PORT=26667
HTTP_SSL_LISTENER_PORT=28182
IIOP_SSL_MUTUALAUTH_PORT=23921
Command create-local-instance executed successfully.

Start a cluster:
$ bin/asadmin start-cluster cluster1
Command start-cluster executed successfully.

The same way you can create another cluster.

You can check summary on clusters by below command:
$ bin/asadmin list-instances -l
NAME HOST PORT PID CLUSTER STATE
instance1 localhost 24848 15421 cluster1 running
instance2 localhost 24849 15437 cluster1 running
Command list-instances executed successfully.

To Stop Cluster:
Stop a cluster:
$ bin/asadmin stop-cluster cluster1
Command stop-cluster executed successfully.
Posted on Aug 01, 2014 by Shelly

Enter your Answer

Name
Email Address
Answer
Security Check
Solve this to continue: 7 + 4 = ?
©2026 WithoutBook