Create a cluster with two instances

export ENABLE_REPLICATION=true

asadmin start-domain

asadmin create-cluster cluster1

asadmin create-local-instance --cluster cluster1 --systemproperties HTTP_LISTENER_PORT=18080:HTTP_SSL_LISTENER_PORT=18181:IIOP_SSL_LISTENER_PORT=13800:IIOP_LISTENER_PORT=13700:JMX_SYSTEM_CONNECTOR_PORT=17676:IIOP_SSL_MUTUALAUTH_PORT=13801:JMS_PROVIDER_PORT=18686:ASADMIN_LISTENER_PORT=14848 instance1

asadmin create-local-instance --cluster cluster1 --systemproperties HTTP_LISTENER_PORT=38080:HTTP_SSL_LISTENER_PORT=38181:IIOP_SSL_LISTENER_PORT=33800:IIOP_LISTENER_PORT=33700:JMX_SYSTEM_CONNECTOR_PORT=37676:IIOP_SSL_MUTUALAUTH_PORT=33801:JMS_PROVIDER_PORT=38686:ASADMIN_LISTENER_PORT=34848 instance2

asadmin start-local-instance instance1

asadmin start-local-instance instance2

Demo the deploy, disable, enable, show-component-status

asadmin deploy --target cluster1 stateless-simple.ear

(go to browser: http://localhost:18080/helloworld)

(go to browser: http://localhost:38080/helloworld)

(go to browser: http://localhost:8080/helloworld)

(show the domain.xml on DAS and instance)

asadmin show-component-status --target cluster1 stateless-simple

asadmin disable --target cluster1 stateless-simple

asadmin show-component-status --target cluster1 stateless-simple

(go to browser: http://localhost:18080/helloworld)

asadmin enable --target cluster1 stateless-simple

asadmin show-component-status --target cluster1 stateless-simple

(go to browser: http://localhost:18080/helloworld)

Demo the list-components, redeploy

asadmin list-components cluster1

asadmin deploy --target cluster1 webapps-simple.war

(go to browser: http://localhost:38080/webapps-simple)

asadmin list-components cluster1

asadmin list-components --verbose cluster1

asadmin disable --target cluster1 stateless-simple

asadmin list-components --verbose cluster1

asadmin redeploy --name webapps-simple --target cluster1 --contextroot foo webapps-simple.war

(go to browser: http://localhost:18080/webapps-simple)

(go to browser: http://localhost:18080/foo)

Demo the undeploy

asadmin undeploy --target cluster1 webapps-simple

(show the domain.xml on DAS and instance)

asadmin list-components cluster1

asadmin undeploy --target cluster1 stateless-simple

asadmin list-components cluster1