Permalink
Browse files

JBEAP-13958 part 2: Update quickstart README files - add content that…

… disappeared during the Markdown to AsciiDoc conversion, fix formatting, make them more consistent with EAP docs
  • Loading branch information...
sgilda committed Dec 23, 2017
1 parent 6a24d6a commit 02d5031d8e92a4113849f04435d83f6aa05d6932
Showing with 3,049 additions and 1,621 deletions.
  1. +61 −37 README.adoc
  2. +33 −20 app-client/README.adoc
  3. +0 −1 attributes.adoc
  4. +21 −21 batch-processing/README.adoc
  5. +1 −1 bean-validation-custom-constraint/README.adoc
  6. +1 −1 bean-validation/README.adoc
  7. +3 −2 bmt/README.adoc
  8. +18 −19 cmt/README.adoc
  9. +28 −15 contacts-jquerymobile/README.adoc
  10. +35 −12 ejb-asynchronous/README.adoc
  11. +22 −12 ejb-in-ear/README.adoc
  12. +6 −6 ejb-in-war/README.adoc
  13. +75 −17 ejb-multi-server/README.adoc
  14. +3 −3 ejb-remote/README.adoc
  15. +52 −15 ejb-security-context-propagation/README.adoc
  16. +106 −33 ejb-security-jaas/README.adoc
  17. +45 −17 ejb-security-programmatic-auth/README.adoc
  18. +30 −8 ejb-security/README.adoc
  19. +35 −11 ejb-throws-exception/README.adoc
  20. +1 −1 ejb-timer/README.adoc
  21. +1 −1 forge-from-scratch/README.adoc
  22. +3 −3 greeter/README.adoc
  23. +49 −14 ha-singleton-deployment/README.adoc
  24. +83 −33 ha-singleton-service/README.adoc
  25. +49 −10 helloworld-html5/README.adoc
  26. +19 −11 helloworld-jms/README.adoc
  27. +17 −6 helloworld-mbean/README.adoc
  28. +26 −8 helloworld-mdb-propertysubstitution/README.adoc
  29. +4 −4 helloworld-mdb/README.adoc
  30. +54 −16 helloworld-mutual-ssl-secured/README.adoc
  31. +42 −13 helloworld-mutual-ssl/README.adoc
  32. +5 −5 helloworld-rs/README.adoc
  33. +4 −4 helloworld-singleton/README.adoc
  34. +42 −12 helloworld-ssl/README.adoc
  35. +3 −3 helloworld-ws/README.adoc
  36. +2 −2 helloworld/README.adoc
  37. +8 −5 hibernate/README.adoc
  38. +37 −13 inter-app/README.adoc
  39. +80 −74 jaxrs-client/README.adoc
  40. +41 −20 jaxws-addressing/README.adoc
  41. +40 −16 jaxws-ejb/README.adoc
  42. +42 −20 jaxws-pojo/README.adoc
  43. +63 −31 jaxws-retail/README.adoc
  44. +19 −15 jsonp/README.adoc
  45. +42 −18 jta-crash-rec/README.adoc
  46. +182 −14 jts-distributed-crash-rec/README.adoc
  47. +105 −67 jts/README.adoc
  48. +28 −18 kitchensink-angularjs/README.adoc
  49. +24 −15 kitchensink-ear/README.adoc
  50. +36 −30 kitchensink-html5-mobile/README.adoc
  51. +19 −12 kitchensink-jsp/README.adoc
  52. +28 −18 kitchensink-ml/README.adoc
  53. +15 −9 kitchensink/README.adoc
  54. +39 −23 logging-tools/README.adoc
  55. +73 −47 logging/README.adoc
  56. +56 −33 mail/README.adoc
  57. +42 −35 managed-executor-service/README.adoc
  58. +172 −107 messaging-clustering-singleton/README.adoc
  59. +135 −84 messaging-clustering/README.adoc
  60. +13 −10 numberguess/README.adoc
  61. +15 −11 payment-cdi-event/README.adoc
  62. +26 −24 resteasy-jaxrs-client/README.adoc
  63. +15 −17 servlet-async/README.adoc
  64. +39 −28 servlet-filterlistener/README.adoc
  65. +66 −32 servlet-security/README.adoc
  66. +67 −36 shopping-cart/README.adoc
  67. +28 −24 shrinkwrap-resolver/README.adoc
  68. +42 −34 spring-greeter/README.adoc
  69. +25 −19 spring-kitchensink-basic/README.adoc
  70. +25 −19 spring-kitchensink-springmvctest/README.adoc
  71. +37 −33 spring-petclinic/README.adoc
  72. +21 −15 spring-resteasy/README.adoc
  73. +16 −10 tasks-jsf/README.adoc
  74. +61 −28 tasks-rs/README.adoc
  75. +14 −6 tasks/README.adoc
  76. +15 −11 temperature-converter/README.adoc
  77. +13 −9 template/README.adoc
  78. +17 −11 thread-racing/README.adoc
  79. +23 −17 websocket-client/README.adoc
  80. +15 −10 websocket-endpoint/README.adoc
  81. +19 −14 websocket-hello/README.adoc
  82. +40 −26 wsat-simple/README.adoc
  83. +38 −22 wsba-coordinator-completion-simple/README.adoc
  84. +37 −23 wsba-participant-completion-simple/README.adoc
  85. +17 −11 xml-jaxp/README.adoc
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -16,17 +16,23 @@ The `app-client` quickstart demonstrates how to code and package a client app an
== What is it?
The `app-client` quickstart demonstrates how to use the {productName} client container to start the client `Main` program and provide Dependency Injections (DI) for client applications in {productNameFull}. It also shows you how to use Maven to package the application according to the JavaEE specification.
The `app-client` quickstart demonstrates how to use the {productName} client container to start the client `Main` program and provide Dependency Injections (DI) for client applications in {productNameFull}. It also shows you how to use Maven to package the application according to the Java EE specification.
This example consists of the following Maven projects, each with a shared parent:
This example consists of the following Maven projects, each with a shared parent.
[cols="30%,70%",options="headers"]
|===
|Sub-project |Description
|Project |Description
| `ejb`
| This project contains the EJB code that can be called by the client.
| `client-simple`
| This project contains a simple client application that runs in the application-client container to show the injection.
| `ear`
| This project builds the EAR artifact and pulls in the EJB and client artifacts.
|`ejb` |An application that can be called by the `client`.
|`ear` |The EAR packaging contains the server and client side.
|`client-simple` |A simple client application for running in the application-client container to show the injection
|===
The root `pom.xml` file builds each of the subprojects in the appropriate order.
@@ -41,9 +47,10 @@ All you need to build this project is {buildRequirements}. See link:{configureMa
In the following instructions, replace `__{jbossHomeName}__` with the actual path to your {productName} installation. The installation path is described in detail here: link:{useProductHomeDocUrl}[Use of {jbossHomeName} and JBOSS_HOME Variables].
[[add_the_application_users]]
== Add the Application Users
If the client and server are run on different hosts, you must add the following users to the {productName} server side application. Be sure to use the names and passwords specified in the table as they are required to run this example.
If the client and server are run on different hosts, you must add the following users to the {productName} server side application. Make sure you use the names and passwords specified in the table as they are required to run this example.
[cols="20%,20%,20%,40%",options="headers"]
|===
@@ -53,7 +60,7 @@ If the client and server are run on different hosts, you must add the following
|quickuser |ApplicationRealm |quick-123 |_leave blank for none_
|===
To add the users, open a terminal and type the following commands:
To add the users, open a terminal and type the following commands.
[source,subs="+quotes,attributes+",options="nowrap"]
----
@@ -68,7 +75,7 @@ If you prefer, you can use the `add-user` utility interactively. For an example
== Start the Server
. Open a terminal and navigate to the root of the {productName} directory.
. Use the following command to start the server:
. Start the {productName} server with the default standalone profile by typing the following command.
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
@@ -81,7 +88,7 @@ NOTE: For Windows, use the `__{jbossHomeName}__\bin\standalone.bat` script.
. Make sure you have started the {productName} server as described above.
. Open a terminal and navigate to the root directory of this quickstart.
. Type this command to build the artifacts:
. Type the following command to build the artifacts.
+
[source,options="nowrap"]
----
@@ -92,8 +99,8 @@ $ mvn clean install wildfly:deploy
This example shows how to invoke an EJB from a remote standalone application on the same machine. Both the client and server are on the same machine, so the defaults are sufficient and no authentication is necessary.
. Be sure the quickstart deployed successfully as described above.
. Navigate to the root directory of this quickstart and type the following command to run the application. Be sure to replace `__{jbossHomeName}__` with the path to your {productName} installation.
. Verify that the quickstart deployed successfully as described above.
. Navigate to the root directory of this quickstart and type the following command to run the application. Make sure you replace `__{jbossHomeName}__` with the path to your {productName} installation.
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
@@ -102,14 +109,16 @@ $ __{jbossHomeName}__/bin/appclient.sh ear/target/app-client.ear#simpleClient.ja
+
NOTE: For Windows, use the `__{jbossHomeName}__\bin\appclient.bat` script.
. Review the result. The client outputs the following information, which is provided by the server application:
. Review the result. The client outputs the following information, which is provided by the server application.
+
[source,options="nowrap"]
----
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) Main started with arguments
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) [Hello, from, command, line]
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) [Hello, from, command, line]
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-##) Hello from StatelessSessionBean@myhost
----
+
The client output shows that the `ServerApplication` is called at the jboss.node `myhost`. The application client connected automatically a server on the same machine.
. Review the server log files to see the bean invocations on the server.
+
@@ -125,8 +134,8 @@ This example shows how to invoke an EJB from a remote standalone Java EE applica
=== Configure Machine_1 (Remote Server Machine)
. Install {productName} on this machine.
. Add the application users to the {productName} server on this machine as described above.
. Start the {productName} server with the following command. Be sure to replace `__MACHINE_1_IP_ADDRESS__` with the IP address of this machine. These arguments make the server accessible to the network.
. xref:add_the_application_users[Add the application users] to the {productName} server on this machine as described above.
. Start the {productName} server with the following command, replacing `__MACHINE_1_IP_ADDRESS__` with the IP address of this machine. These arguments make the server accessible to the network.
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
@@ -155,15 +164,15 @@ remote.connection.default.password=quick-123
. Open a terminal and navigate to the root directory of the quickstart.
. Deploy the `app-client` quickstart to the remote machine using the following command:
. Deploy the `app-client` quickstart to the remote machine using the following command. Make sure you replace `__MACHINE_1_IP_ADDRESS__` with the IP address of `Machine_1`.
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
$ mvn clean install wildfly:deploy -Dwildfly.hostname=__MACHINE_1_IP_ADDRESS__ [-Dwildfly.port=9099] -Dwildfly.username=admin -Dwildfly.password=admin-123
----
. Be sure that the quickstart deployed successfully and the server is running on `Machine_1` as described above.
. Type this command to run the `app-client` application:
. Verify that the quickstart deployed successfully and the server is running on `Machine_1` as described above.
. Type the following command to run the `app-client` application.
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
@@ -172,21 +181,25 @@ $ __{jbossHomeName}__/bin/appclient.sh --ejb-client-properties=ejb-client.proper
+
NOTE: For Windows, use the `__{jbossHomeName}__\bin\appclient.bat` script.
. Review the result. The client outputs the following information, which was provided by the application:
. Review the result. The client outputs the following information, which was provided by the application.
+
[source,options="nowrap"]
----
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) Main started with arguments
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) [Hello, from, command, line]
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-##) Hello from StatelessSessionBean@theOtherHOST
----
+
The client output shows that the `ServerApplication` is called at the jboss.node `theOtherHOST`.
. Review the server log files on the remote machine to see the bean invocations on the server.
+
[source,options="nowrap"]
----
ClientContext is here = {Client =dev84, jboss.source-address=localhost/127.0.0.1:45315}
----
+
As shown above, the connected servers can be configured using the properties file. It is also possible to connect multiple servers or a cluster using the same `jboss-ejb-client.properties` file.
== Undeploy the Archive from the Local Machine
View
@@ -26,4 +26,3 @@
:configureBytemanQuickstartDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_BYTEMAN.adoc#configure_byteman_for_use_with_the_quickstarts
:configureBytemanHaltDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_BYTEMAN.adoc#use_byteman_to_halt_the_application[
:configureBytemanQuickstartsDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_BYTEMAN.adoc#configure_byteman_for_use_with_the_quickstarts
>>>>>>> 3712738... JBEAP-13958 part 1: Update quickstart README files - replace shared doc links with new adoc versions, fix formatting up to ejb quickstarts
@@ -50,8 +50,8 @@ In the following instructions, replace `__{jbossHomeName}__` with the actual pat
== Start the Server
. Open a command line and navigate to the root of the {productName} directory.
. The following shows the command line to start the server with the default profile:
. Open a terminal and navigate to the root of the {productName} directory.
. Start the {productName} server with the default standalone profile by typing the following command.
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
@@ -63,8 +63,8 @@ NOTE: For Windows, use the `__{jbossHomeName}__\bin\standalone.bat` script.
== Build and Deploy the Quickstart
. Make sure you have started the {productName} server as described above.
. Open a command line and navigate to the root directory of this quickstart.
. Type this command to build and deploy the archive:
. Open a terminal and navigate to the root directory of this quickstart.
. Type the following command to build and deploy the archive.
+
[source,options="nowrap"]
----
@@ -81,14 +81,12 @@ You are presented with a simple form that allows you to generate sample files to
=== Usage 1: Import the file without any errors
Click on *Generate a new file and start import job* button. This will generate a new file with 10 unique records to be imported. After the file is generated, the import job will start.
You will see a table containing information about the task that was just started. You can click on *Update jobs list* button and verify that the job was completed.
==== Investigate the Console Output
. Click on *Generate a new file and start import job* button. This generates a new file with 10 unique records to be imported. The import job starts after the file is generated.
At the logs you will see that the files with 10 records were processed using 3 records at a time.
. A table is displayed containing information about the task that was started. Click on the *Update jobs list* button and verify that the job was completed.
. Investigate the console output. It shows that files with 10 records were processed, 3 records at a time.
+
[source,options="nowrap"]
----
INFO [org.jboss.as.quickstarts.batch.controller.BatchController] (default task-3) Starting to generate 10 in file /var/folders/j8/63sgdmbn5tqdkyw0tz6df53r0000gn/T/temp-file.txt
@@ -106,7 +104,7 @@ INFO [org.jboss.as.quickstarts.batch.job.ContactsFormatter] (Batch Thread - 1)
INFO [org.jboss.as.quickstarts.batch.job.listener.PersistListener] (Batch Thread - 1) Preparing to persist 3 contacts
INFO [org.jboss.as.quickstarts.batch.job.listener.PersistListener] (Batch Thread - 1) Persisting 3 contacts
INFO [org.jboss.as.quickstarts.batch.job.ContactsFormatter] (Batch Thread - 1) Register #7 - Changing name niDXWwGJuQ -> Nidxwwgjuq | phone 949448390 -> (949)-448-390
15:57:40,850 INFO [org.jboss.as.quickstarts.batch.job.ContactsFormatter] (Batch Thread - 1) Register #8 - Changing name VZBArfowSe -> Vzbarfowse | phone 902370961 -> (902)-370-961
INFO [org.jboss.as.quickstarts.batch.job.ContactsFormatter] (Batch Thread - 1) Register #8 - Changing name VZBArfowSe -> Vzbarfowse | phone 902370961 -> (902)-370-961
INFO [org.jboss.as.quickstarts.batch.job.ContactsFormatter] (Batch Thread - 1) Register #9 - Changing name aSpyWCWwje -> Aspywcwwje | phone 246977695 -> (246)-977-695
INFO [org.jboss.as.quickstarts.batch.job.listener.PersistListener] (Batch Thread - 1) Preparing to persist 3 contacts
INFO [org.jboss.as.quickstarts.batch.job.listener.PersistListener] (Batch Thread - 1) Persisting 3 contacts
@@ -121,20 +119,22 @@ INFO [org.jboss.as.quickstarts.batch.job.listener.JobListener] (Batch Thread -
Now you will simulate a file with duplicate records. This will raise an exception and stop the processing. After that, you will fix the file and continue the importing where it stopped.
Mark the *Generate a duplicate record* checkbox and click on *Generate a new file and start import job* button. If you click on *Update jobs list* button, you will see that the job failed with the following Exit Status: `Error : org.hibernate.exception.ConstraintViolationException: could not execute statement`. This was caused because the job tried to insert a duplicate record at the Database. You will also see `org.h2.jdbc.JdbcSQLException: Unique index or primary key violation` exception stacktraces in the server log.
Next, you will fix the file and restart that job execution. Uncheck the *Generate a duplicate record* checkbox and click on *Generate a new file* button. This will generate file without errors.
. Mark the *Generate a duplicate record* checkbox and click on *Generate a new file and start import job* button. If you click on *Update jobs list* button, you will see that the job failed with the following Exit Status: `Error : org.hibernate.exception.ConstraintViolationException: could not execute statement`. This was caused because the job tried to insert a duplicate record at the Database. You will also see `org.h2.jdbc.JdbcSQLException: Unique index or primary key violation` exception stacktraces in the server log.
Click on *Restart* button in the last column for that job instance in the *List of Jobs* table. If you click on *Update jobs list* button, you will see that the job was completed.
. Next, you will fix the file and restart that job execution. Uncheck the *Generate a duplicate record* checkbox and click on *Generate a new file* button. This will generate the file without errors.
Analyze the logs and check that the job started from the last checkpoint.
. Click on *Restart* button in the last column for that job instance in the *List of Jobs* table. If you click on *Update jobs list* button, you will see that the job was completed.
. Review the server logs and verify that the job started from the last checkpoint.
+
[source,options="nowrap"]
----
16:08:56,323 INFO [org.jboss.as.quickstarts.batch.job.RecordsReader] (Batch Thread - 3) Skipping to line 3 as marked by previous checkpoint
INFO [org.jboss.as.quickstarts.batch.job.RecordsReader] (Batch Thread - 3) Skipping to line 3 as marked by previous checkpoint
----
==== Investigate the Console Output
. Investigate the console output.
+
[source,options="nowrap"]
----
INFO [org.jboss.as.quickstarts.batch.job.listener.JobListener] (Batch Thread - 3) Job import-file - Execution #3 starting.
INFO [org.jboss.as.quickstarts.batch.job.RecordsReader] (Batch Thread - 3) Skipping to line 3 as marked by previous checkpoint
@@ -158,9 +158,9 @@ INFO [org.jboss.as.quickstarts.batch.job.listener.JobListener] (Batch Thread -
=== Usage 3: Import an error file and do not fix the errors
Check the *Generate a duplicate record* checkbox and click on *Generate a new file ans start import job* button. If you click on *Update jobs list* button, you will see that the job failed with the following Exit Status: `Error : org.hibernate.exception.ConstraintViolationException: could not execute statement`. This was caused because you tried to insert a duplicate record at the Database.
. Check the *Generate a duplicate record* checkbox and click on *Generate a new file ans start import job* button. If you click on *Update jobs list* button, you will see that the job failed with the following Exit Status: `Error : org.hibernate.exception.ConstraintViolationException: could not execute statement`. This was caused because you tried to insert a duplicate record at the Database.
This time you will not fix the file. Just click on *Restart* button again. If you click on *Update jobs list* button, you will see that the job was marked as `ABANDONED` this time because it was restarted once. Notice that there is a new parameter: `restartedOnce=true`. This behavior was implemented at `JobListener` for demonstration purpose to avoid that a `FAILED` job that was already restarted once, to be restarted twice.
. This time you will not fix the file. Just click on *Restart* button again. If you click on *Update jobs list* button, you will see that the job was marked as `ABANDONED` this time because it was restarted once. Notice that there is a new parameter: `restartedOnce=true`. This behavior was implemented in `JobListener` for demonstration purposes, to prevent a `FAILED` job from being restarted twice.
== Server Log: Expected Warnings and Errors
@@ -40,7 +40,7 @@ In the following instructions, replace `__{jbossHomeName}__` with the actual pat
== Start the Server
. Open a terminal and navigate to the root of the {productName} directory.
. The following shows the command line to start the server:
. Start the {productName} server with the default standalone profile by typing the following command.
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
@@ -42,7 +42,7 @@ In the following instructions, replace `__{jbossHomeName}__` with the actual pat
== Start the Server
. Open a terminal and navigate to the root of the {productName} directory.
. The following shows the command line to start the server:
. Start the {productName} server with the default standalone profile by typing the following command.
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
View
@@ -20,7 +20,8 @@ The `bmt` quickstart demonstrates how to manually manage transaction demarcation
On occasion, the application developer requires finer grained control over the lifecycle of JTA transactions and JPA Entity Managers than the defaults provided by the Java EE container. This example shows how the developer can override these defaults and take control of aspects of the lifecycle of JPA and transactions.
When you run this example, you will be provided with a `Use bean managed Entity Managers` checkbox.
When you run this example, you are presented with a *Use bean managed Entity Managers* checkbox.
* If you check the checkbox, it shows the developer responsibilities when injecting an Entity Manager into a managed (stateless) bean.
* If you uncheck the checkbox, shows the developer responsibilities when using JPA and transactions with an unmanaged component.
@@ -47,7 +48,7 @@ In the following instructions, replace `__{jbossHomeName}__` with the actual pat
== Start the Server
. Open a terminal and navigate to the root of the {productName} directory.
. The following shows the command line to start the server:
. Start the {productName} server with the default standalone profile by typing the following command.
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
Oops, something went wrong.

0 comments on commit 02d5031

Please sign in to comment.