diff --git a/ha-singleton-deployment/README.adoc b/ha-singleton-deployment/README.adoc index 059710ca73..ab34f0056d 100644 --- a/ha-singleton-deployment/README.adoc +++ b/ha-singleton-deployment/README.adoc @@ -208,15 +208,15 @@ endif::[] The `ha-singleton-deployment` quickstart demonstrates the recommended way to deploy any service packaged in an application archive as a cluster-wide singleton. :standalone-server-type: ha -:archiveType: jar +:archiveType: war :requires-multiple-servers: :jbds-not-supported: == What is it? The `ha-singleton-deployment` quickstart demonstrates the deployment of a service packaged in an application as a cluster-wide singleton using singleton deployments. -In this example, the service is a timer that is initialized by a `@Startup @Singleton` bean. -The example is built and packaged as a single EJB archive. +In this example, the service is a timer that is initialized by a `@Startup @Singleton` Jakarta Enterprise Beans bean. +The example is built and packaged as a single web archive. For more information about singleton deployments, see _HA Singleton Deployments_ in the {LinkDevelopmentGuide}[__{DevelopmentBookName}__] for {DocInfoProductName} located on the Red Hat Customer Portal. @@ -312,15 +312,15 @@ This example is not limited to two servers. Additional servers can be started by $ mvn clean install wildfly:deploy ---- -. Ensure the `target/{artifactId}.jar` archive is deployed to `node1` (the one without port offset) by observing the log. +. Ensure the `target/{artifactId}.war` archive is deployed to `node1` (the one without port offset) by observing the log. + [source,options="nowrap"] ---- -INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "ha-singleton-deployment.jar" (runtime-name: "ha-singleton-deployment.jar") +INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "ha-singleton-deployment.war" (runtime-name: "ha-singleton-deployment.war") ... -INFO [org.wildfly.clustering.server] (DistributedSingletonService - 1) WFLYCLSV0003: node1 elected as the singleton provider of the jboss.deployment.unit."ha-singleton-deployment.jar".FIRST_MODULE_USE service -INFO [org.wildfly.clustering.server] (DistributedSingletonService - 1) WFLYCLSV0001: This node will now operate as the singleton provider of the jboss.deployment.unit."ha-singleton-deployment.jar".FIRST_MODULE_USE service -INFO [org.jboss.as.server] (management-handler-thread - 4) WFLYSRV0010: Deployed "ha-singleton-deployment.jar" (runtime-name : "ha-singleton-deployment.jar") +INFO [org.wildfly.clustering.server] (DistributedSingletonService - 1) WFLYCLSV0003: node1 elected as the singleton provider of the jboss.deployment.unit."ha-singleton-deployment.war".FIRST_MODULE_USE service +INFO [org.wildfly.clustering.server] (DistributedSingletonService - 1) WFLYCLSV0001: This node will now operate as the singleton provider of the jboss.deployment.unit."ha-singleton-deployment.war".FIRST_MODULE_USE service +INFO [org.jboss.as.server] (management-handler-thread - 4) WFLYSRV0010: Deployed "ha-singleton-deployment.war" (runtime-name : "ha-singleton-deployment.war") ... WARNING [class org.jboss.as.quickstarts.ha.singleton.SingletonTimer] (ServerService Thread Pool -- 68) SingletonTimer is initializing. INFO [class org.jboss.as.quickstarts.ha.singleton.SingletonTimer] (EJB default - 1) SingletonTimer: Hello World! @@ -341,11 +341,11 @@ WARN [org.jboss.as.clustering.jgroups.protocol.UDP] (ServerService Thread Pool mvn wildfly:deploy -Dwildfly.port=10090 ---- -. Ensure the `service/target/{artifactId}.jar` archive is deployed to `node2` by observing the log. Note that even though the logs indicate "Deployed", the deployment does not actually deploy completely and the timer is not operating on this node. +. Ensure the `service/target/{artifactId}.war` archive is deployed to `node2` by observing the log. Note that even though the logs indicate "Deployed", the deployment does not actually deploy completely and the timer is not operating on this node. + [source,options="nowrap"] ---- -INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "ha-singleton-deployment.jar" (runtime-name: "ha-singleton-deployment.jar") +INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "ha-singleton-deployment.war" (runtime-name: "ha-singleton-deployment.war") INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000078: Starting JGroups channel server ... INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000094: Received new cluster view for channel server: [node1|1] (2) [node1, node2] @@ -353,7 +353,7 @@ INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000079: Channel server local address is node2, physical addresses are [127.0.0.1:55300] INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-6) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.7.Final INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 68) WFLYCLINF0002: Started default cache from server container -INFO [org.jboss.as.server] (management-handler-thread - 2) WFLYSRV0010: Deployed "ha-singleton-deployment.jar" (runtime-name : "ha-singleton-deployment.jar") +INFO [org.jboss.as.server] (management-handler-thread - 2) WFLYSRV0010: Deployed "ha-singleton-deployment.war" (runtime-name : "ha-singleton-deployment.war") ---- . Verify the timer is running only on one instance by observing the logs. The node running the timer will output the following every 5 seconds: @@ -367,7 +367,7 @@ While the instance not running, the timer will display the following as the last + [source,options="nowrap"] ---- -INFO [org.jboss.as.server] (management-handler-thread - 2) WFLYSRV0010: Deployed "ha-singleton-deployment.jar" (runtime-name : "ha-singleton-deployment.jar") +INFO [org.jboss.as.server] (management-handler-thread - 2) WFLYSRV0010: Deployed "ha-singleton-deployment.war" (runtime-name : "ha-singleton-deployment.war") ---- . Verify failover of the singleton deployment. Shutdown the server operating as the primary provider of the singleton, for instance by using the `Ctrl` + `C` key combination in the terminal. Observe the following messages on the node being shutdown: @@ -386,8 +386,8 @@ Now observe the log messages on the second server. The node will now be elected + [source,options="nowrap"] ---- -INFO [org.wildfly.clustering.server] (DistributedSingletonService - 1) WFLYCLSV0003: node2 elected as the singleton provider of the jboss.deployment.unit."ha-singleton-deployment.jar".FIRST_MODULE_USE service -INFO [org.wildfly.clustering.server] (DistributedSingletonService - 1) WFLYCLSV0001: This node will now operate as the singleton provider of the jboss.deployment.unit."ha-singleton-deployment.jar".FIRST_MODULE_USE service +INFO [org.wildfly.clustering.server] (DistributedSingletonService - 1) WFLYCLSV0003: node2 elected as the singleton provider of the jboss.deployment.unit."ha-singleton-deployment.war".FIRST_MODULE_USE service +INFO [org.wildfly.clustering.server] (DistributedSingletonService - 1) WFLYCLSV0001: This node will now operate as the singleton provider of the jboss.deployment.unit."ha-singleton-deployment.war".FIRST_MODULE_USE service INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-4) ISPN000094: Received new cluster view for channel server: [node2|2] (1) [node2] ... WARNING [class org.jboss.as.quickstarts.ha.singleton.SingletonTimer] (ServerService Thread Pool -- 68) SingletonTimer is initializing. @@ -405,7 +405,7 @@ Note the `include-runtime` flag on the `read-resource` operation. [source,options="nowrap"] ---- -[standalone@localhost:9990 /] /subsystem=singleton/singleton-policy=default/deployment=ha-singleton-deployment.jar:read-resource(include-runtime=true) +[standalone@localhost:9990 /] /subsystem=singleton/singleton-policy=default/deployment=ha-singleton-deployment.war:read-resource(include-runtime=true) { "outcome" => "success", "result" => { @@ -423,7 +423,7 @@ The typical use case for scripting to determine the primary provider of a servic [source,options="nowrap"] ---- -[rhusar@ribera bin]$ ./jboss-cli.sh --output-json --connect "/subsystem=singleton/singleton-policy=default/deployment=ha-singleton-deployment.jar:read-attribute(name=primary-provider)" +[rhusar@ribera bin]$ ./jboss-cli.sh --output-json --connect "/subsystem=singleton/singleton-policy=default/deployment=ha-singleton-deployment.war:read-attribute(name=primary-provider)" { "outcome" : "success", "result" : "node1" @@ -467,9 +467,9 @@ $ mvn wildfly:deploy -Dwildfly.port=10090 [source,subs="+quotes,attributes+",options="nowrap"] ---- $ __{jbossHomeName}_1__/bin/jboss-cli.sh --connect -deployment-overlay add --name=singleton-deployment --deployments=ha-singleton-deployment.jar --content=META-INF/singleton-deployment.xml=singleton-deployment.xml +deployment-overlay add --name=singleton-deployment --deployments=ha-singleton-deployment.war --content=META-INF/singleton-deployment.xml=singleton-deployment.xml deployment-overlay redeploy-affected --name=singleton-deployment -$ __{jbossHomeName}_2__/bin/jboss-cli.sh --connect --controller=localhost:10090 deployment-overlay add --name=singleton-deployment --deployments=ha-singleton-deployment.jar --content=META-INF/singleton-deployment.xml=singleton-deployment.xml deployment-overlay redeploy-affected --name=singleton-deployment +$ __{jbossHomeName}_2__/bin/jboss-cli.sh --connect --controller=localhost:10090 deployment-overlay add --name=singleton-deployment --deployments=ha-singleton-deployment.war --content=META-INF/singleton-deployment.xml=singleton-deployment.xml deployment-overlay redeploy-affected --name=singleton-deployment ---- + NOTE: For Windows, use the ` __{jbossHomeName}_1__\bin\jboss-cli.bat` and ` __{jbossHomeName}_2__\bin\jboss-cli.bat` scripts. @@ -481,7 +481,7 @@ NOTE: For Windows, use the ` __{jbossHomeName}_1__\bin\jboss-cli.bat` and ` __{j - + ---- @@ -510,28 +510,6 @@ $ mvn wildfly:undeploy $ mvn wildfly:undeploy -Dwildfly.port=10090 ---- -// Run the Quickstart in Red Hat CodeReady Studio or Eclipse -:leveloffset: +1 - -[[run_the_quickstart_in_redhat_codeready_studio_or_eclipse]] -= Run the Quickstart in {JBDSProductName} or Eclipse -//****************************************************************************** -// Include this template to provide instructions to run the quickstart -// in Red Hat CodeReady Studio. -// -// If the quickstart is not supported, create the `jbds-not-supported` attribute. -//****************************************************************************** -ifdef::jbds-not-supported[] -This quickstart is not supported in {JBDSProductName}. -endif::jbds-not-supported[] - -ifndef::jbds-not-supported[] -You can also start the server and deploy the quickstarts or run the Arquillian tests in {JBDSProductName} or from Eclipse using JBoss tools. For general information about how to import a quickstart, add a {productName} server, and build and deploy a quickstart, see link:{useEclipseUrl}[Use {JBDSProductName} or Eclipse to Run the Quickstarts]. -endif::jbds-not-supported[] - -// Add additional instructions specific to running this quickstart in an IDE here. - -:leveloffset!: // Debug the Application :leveloffset: +1 @@ -561,12 +539,12 @@ $ mvn dependency:resolve -Dclassifier=javadoc :leveloffset!: -//************************************************* -// Product Release content only -//************************************************* -ifdef::ProductRelease[] - // Quickstart not compatible with OpenShift -include::../shared-doc/openshift-incompatibility.adoc[leveloffset=+1] +:leveloffset: +1 -endif::[] +[[openshift_incompatibility]] += {xpaasproduct-shortname} Incompatibility + +This quickstart is not compatible with {xpaasproduct-shortname}. + +:leveloffset!: diff --git a/ha-singleton-service/README.adoc b/ha-singleton-service/README.adoc index b94a1eed32..4b5999e2a8 100644 --- a/ha-singleton-service/README.adoc +++ b/ha-singleton-service/README.adoc @@ -208,7 +208,7 @@ endif::[] The `ha-singleton-service` quickstart demonstrates how to deploy a cluster-wide singleton JBoss MSC service. :standalone-server-type: ha -:archiveType: jar +:archiveType: war :requires-multiple-servers: :jbds-not-supported: @@ -218,7 +218,7 @@ The `ha-singleton-services` quickstart demonstrates pattern, or way, to deploy a Make sure you inspect the `activate()` method of the `SingletonServiceActivator` class of the example. Although the default election policy is used to build the singleton services for this example, scripts and instructions are provided later in this document to demonstrate how to xref:configuring_election_policies[configure other election policies]. -This example is built and packaged as JAR archive. +This example is built and packaged as a WAR archive. For more information about clustered singleton services, see _HA Singleton Service_ in the {LinkDevelopmentGuide}[__{DevelopmentBookName}__] for {DocInfoProductName} located on the Red Hat Customer Portal. @@ -313,18 +313,18 @@ This example demonstrates a singleton service and a querying service that regula . Start the {productName} servers as described in the above section. . Open a terminal and navigate to the `ha-singleton-service/` directory located in the root directory of the quickstarts. -. Use the following command to clean up any previously built artifacts, and to build and deploy the JAR archive. +. Use the following command to clean up any previously built artifacts, and to build and deploy the WAR archive. + [source,options="nowrap"] ---- $ mvn clean install wildfly:deploy ---- -. Investigate the Console Output for Server 1. Verify that the `target/ha-singleton-service.jar` archive is deployed to `node1`, which is the first server started without port offset, by checking the server log. +. Investigate the Console Output for Server 1. Verify that the `target/ha-singleton-service.war` archive is deployed to `node1`, which is the first server started without port offset, by checking the server log. + [source,options="nowrap"] ---- -INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0027: Starting deployment of "ha-singleton-service.jar" (runtime-name: "ha-singleton-service.jar") +INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0027: Starting deployment of "ha-singleton-service.war" (runtime-name: "ha-singleton-service.war") INFO [ServiceActivator] (MSC service thread 1-5) Singleton and querying services activated. INFO [QueryingService] (MSC service thread 1-3) Querying service started. ... @@ -351,16 +351,16 @@ WARN [org.jboss.as.clustering.jgroups.protocol.UDP] (ServerService Thread Pool mvn wildfly:deploy -Dwildfly.port=10090 ---- -. Investigate the console output for both servers. Verify that the `target/ha-singleton-service.jar` archive is deployed to `node2` by checking the server log. +. Investigate the console output for both servers. Verify that the `target/ha-singleton-service.war` archive is deployed to `node2` by checking the server log. + [source,options="nowrap"] ---- INFO [org.jboss.as.repository] (management-handler-thread - 4) WFLYDR0001: Content added at location /Users/rhusar/wildfly/build/target/y/standalone/data/content/18/6efcc6c07b471f641cfcc97f9120505726e6bd/content -INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "ha-singleton-service.jar" (runtime-name: "ha-singleton-service.jar") +INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "ha-singleton-service.war" (runtime-name: "ha-singleton-service.war") INFO [ServiceActivator] (MSC service thread 1-6) Singleton and querying services activated. INFO [QueryingService] (MSC service thread 1-5) Querying service started. ... -INFO [org.jboss.as.server] (management-handler-thread - 4) WFLYSRV0010: Deployed "ha-singleton-service.jar" (runtime-name : "ha-singleton-service.jar") +INFO [org.jboss.as.server] (management-handler-thread - 4) WFLYSRV0010: Deployed "ha-singleton-service.war" (runtime-name : "ha-singleton-service.war") ... INFO [org.jboss.as.quickstarts.ha.singleton.service.QueryingService] (pool-12-thread-1) Singleton service running on node1. ---- @@ -407,14 +407,14 @@ INFO [org.jboss.as.quickstarts.ha.singleton.service.SingletonService] (MSC serv . Start the {productName} servers as described in the above section. . Open a terminal and navigate to the `ha-singleton-service/` directory located in the root directory of the quickstarts. -. Use the following command to undeploy the JAR archive from Server 1. +. Use the following command to undeploy the WAR archive from Server 1. + [source,options="nowrap"] ---- $ mvn wildfly:undeploy ---- -. Use the following command to undeploy the JAR archive from Server 2. +. Use the following command to undeploy the WAR archive from Server 2. + [source,options="nowrap"] ---- @@ -699,11 +699,11 @@ INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service == Undeploy the Deployments -If you have not yet done so, you can undeploy all of the deployed artifacts by following these steps. +If you have not yet done so, you can undeploy all the deployed artifacts by following these steps. . Start the two servers with the HA profile as described above. . Open a terminal and navigate to the root directory of this quickstart. -. Use the following commands to undeploy all of the artifacts. +. Use the following commands to undeploy all the artifacts. + [source,options="nowrap"] ---- @@ -779,12 +779,12 @@ $ mvn dependency:resolve -Dclassifier=javadoc :leveloffset!: -//************************************************* -// Product Release content only -//************************************************* -ifdef::ProductRelease[] - // Quickstart not compatible with OpenShift -include::../shared-doc/openshift-incompatibility.adoc[leveloffset=+1] +:leveloffset: +1 -endif::[] +[[openshift_incompatibility]] += {xpaasproduct-shortname} Incompatibility + +This quickstart is not compatible with {xpaasproduct-shortname}. + +:leveloffset!: