热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

Without Book 提问

Review the question and existing answers carefully before replying. The best answers explain the reasoning, steps, and tradeoffs so other learners can benefit too.

问题. 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.

发布时间 Jul 31, 2014 发布者 Abhijit
回答. 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.
发布时间 Aug 01, 2014 发布者 Shelly

输入你的回答

姓名
邮箱地址
回答
安全验证
继续前请计算: 3 + 2 = ?
版权所有 © 2026,WithoutBook。