You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h2><ahref="#testing-the-quickstarts" id="testing-the-quickstarts">Testing the quickstarts</a></h2>
9
+
<p>Most of the quickstarts require starting Red Hat JBoss Enterprise Application Platform in standalone mode. Some require the "standalone-full" profile, some require XTS, some require Postgres and some require other quickstarts to be deployed. Profiles are used in the root POM to separate out these groups, allowing you to test the quickstarts easily. For example, to run those that require only standalone mode:</p>
<p>Merge from the tag in the other repo that you wish to use. It is important to use a tag, to make tracking of history easier. We use a recursive merge strategy, always preferring changes from the other repo, in effect overwriting what we have locally.</p>
<p>The quickstarts use flexmark maven plugin to process the markdown. This builds on the basic markdown syntax, adding support for tables, code highlighting, relaxed code blocks etc). We add a couple of custom piece of markup - [TOC] which allows a table of contents, based on headings, to be added to any file, and [Quickstart-TOC], which adds in a table listing the quickstarts.</p>
37
+
<p>Just run</p>
38
+
<pre><code> mvn generate-resources -Pdocs
39
+
</code></pre>
40
+
<p>To render all markdown files to HTML.</p>
41
+
<p>To do proper release with zip file & all markdown files with resolved variables and rendered html files, run</p>
42
+
<pre><code> mvn clean install -Drelease
43
+
</code></pre>
44
+
<p>Which will also result in zip with all quickstarts in dist/target</p>
45
+
<h2><ahref="#publishing-builds-to-maven" id="publishing-builds-to-maven">Publishing builds to Maven</a></h2>
46
+
<ol>
47
+
<li>You must have gpg set up and your key registered, as described at <ahref="hhttp://blog.sonatype.com/people/2010/01/how-to-generate-pgp-signatures-with-maven/">hhttp://blog.sonatype.com/people/2010/01/how-to-generate-pgp-signatures-with-maven/</a></li>
48
+
<li>You must provide a property <code>gpg.passphrase</code> in your <code>settings.xml</code> in the <code>release</code> profile e.g.
<li>You must have a JBoss Nexus account, configured with the server id in <code>settings.xml</code> with the id <code>jboss-releases-repository</code> e.g.
58
+
<pre><code> <server>
59
+
<id>jboss-releases-repository</id>
60
+
<username>myUserName</username>
61
+
<password>myPassword</password>
62
+
</server>
63
+
</code></pre>
64
+
</li>
65
+
<li>
66
+
<p>Add <code>org.sonatype.plugins</code> plug-in group to your <code>settings.xml</code> so the Nexus plug-in can be available for publishing scripts.</p>
<p>This will update the version number, commit and tag, build the distro zip and upload it to <download.jboss.org>. Then it will reset the version number back to the snapshot version number.</p>
Copy file name to clipboardexpand all lines: RELEASE_PROCEDURE.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Quickstarts Release Procedure
4
4
Testing the quickstarts
5
5
-----------------------
6
6
7
-
Most of the quickstarts require starting ${product.name.full} in standalone mode. Some require the "standalone-full" profile, some require XTS, some require Postgres and some require other quickstarts to be deployed. Profiles are used in the root POM to separate out these groups, allowing you to test the quickstarts easily. For example, to run those that require only standalone mode:
7
+
Most of the quickstarts require starting Red Hat JBoss Enterprise Application Platform in standalone mode. Some require the "standalone-full" profile, some require XTS, some require Postgres and some require other quickstarts to be deployed. Profiles are used in the root POM to separate out these groups, allowing you to test the quickstarts easily. For example, to run those that require only standalone mode:
<body><h1><ahref="#app-client-use-the-jboss-eap-application-client-container" id="app-client-use-the-jboss-eap-application-client-container">app-client: Use the JBoss EAP Application Client Container</a></h1>
8
+
<p>Author: Wolf-Dieter Fink<br/>
9
+
Level: Intermediate<br/>
10
+
Technologies: EJB, EAR, AppClient<br/>
11
+
Summary: The <code>app-client</code> quickstart demonstrates how to code and package a client app and use the JBoss EAP client container to start the client Main program.<br/>
<h2><ahref="#what-is-it" id="what-is-it">What is it?</a></h2>
15
+
<p>The <code>app-client</code> quickstart demonstrates how to use the JBoss EAP client container to start the client <code>Main</code> program and provide Dependency Injections (DI) for client applications in Red Hat JBoss Enterprise Application Platform. It also shows you how to use Maven to package the application according to the JavaEE specification.</p>
16
+
<p>This example consists of the following Maven projects, each with a shared parent:</p>
<tr><tdalign="left"><code>ejb</code></td><tdalign="left"> An application that can be called by the <code>client</code>.</td></tr>
23
+
<tr><tdalign="left"><code>ear</code></td><tdalign="left"> The EAR packaging contains the server and client side.</td></tr>
24
+
<tr><tdalign="left"><code>client-simple</code></td><tdalign="left"> A simple client application for running in the application-client container to show the injection</td></tr>
25
+
</tbody>
26
+
</table>
27
+
<p>The root <code>pom.xml</code> file builds each of the subprojects in the appropriate order.</p>
<p>The application this project produces is designed to be run on Red Hat JBoss Enterprise Application Platform 7.1 or later.</p>
30
+
<p>All you need to build this project is Java 8.0 (Java SDK 1.8) or later and Maven 3.3.1 or later. See <ahref="https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_MAVEN_JBOSS_EAP7.md#configure-maven-to-build-and-deploy-the-quickstarts">Configure Maven for JBoss EAP 7.1</a> to make sure you are configured correctly for testing the quickstarts.</p>
31
+
<h2><ahref="#use-of-eap7-home" id="use-of-eap7-home">Use of EAP7_HOME</a></h2>
32
+
<p>In the following instructions, replace <code>EAP7_HOME</code> with the actual path to your JBoss EAP installation. The installation path is described in detail here: <ahref="https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/USE_OF_EAP7_HOME.md#use-of-eap_home-and-jboss_home-variables">Use of EAP7_HOME and JBOSS_HOME Variables</a>.</p>
33
+
<h2><ahref="#add-the-application-users" id="add-the-application-users">Add the Application Users</a></h2>
34
+
<p>If the client and server are run on different hosts, you must add the following users to the JBoss EAP server side application. Be sure to use the names and passwords specified in the table as they are required to run this example.</p>
<tr><tdalign="left"> admin</td><tdalign="left"> ManagementRealm </td><tdalign="left"> admin-123 </td><tdalign="left"><em>leave blank for none</em></td></tr>
41
+
<tr><tdalign="left"> quickuser</td><tdalign="left"> ApplicationRealm </td><tdalign="left"> quick-123 </td><tdalign="left"><em>leave blank for none</em></td></tr>
42
+
</tbody>
43
+
</table>
44
+
<p>To add the users, open a command prompt and type the following commands:</p>
45
+
<pre><code> For Linux:
46
+
EAP7_HOME/bin/add-user.sh -u admin -p admin-123
47
+
EAP7_HOME/bin/add-user.sh -a -u quickuser -p quick-123
48
+
49
+
For Windows:
50
+
EAP7_HOME\bin\add-user.bat -u admin -p admin-123
51
+
EAP7_HOME\bin\add-user.bat -a -u quickuser -p quick-123
52
+
</code></pre>
53
+
<p>If you prefer, you can use the add-user utility interactively. For an example of how to use the add-user utility, see the instructions located here: <ahref="https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CREATE_USERS.md#add-an-application-user">Add an Application User</a>.</p>
54
+
<h2><ahref="#start-the-server" id="start-the-server">Start the Server</a></h2>
55
+
<ol>
56
+
<li>Open a command prompt and navigate to the root of the JBoss EAP directory.</li>
57
+
<li>The following shows the command line to start the server:
58
+
<pre><code>For Linux: EAP7_HOME/bin/standalone.sh
59
+
For Windows: EAP7_HOME\bin\standalone.bat
60
+
</code></pre>
61
+
</li>
62
+
</ol>
63
+
<h2><ahref="#build-and-deploy-the-quickstart" id="build-and-deploy-the-quickstart">Build and Deploy the Quickstart</a></h2>
64
+
<ol>
65
+
<li>Make sure you have started the JBoss EAP server as described above.</li>
66
+
<li>Open a command prompt and navigate to the root directory of this quickstart.</li>
67
+
<li>Type this command to build the artifacts:
68
+
<pre><code>mvn clean install wildfly:deploy
69
+
</code></pre>
70
+
</li>
71
+
</ol>
72
+
<h2><ahref="#access-the-remote-client-application-from-the-same-machine" id="access-the-remote-client-application-from-the-same-machine">Access the Remote Client Application from the Same Machine</a></h2>
73
+
<p>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.</p>
74
+
<ol>
75
+
<li>Be sure the quickstart deployed successfully as described above.</li>
76
+
<li>Navigate to the root directory of this quickstart and type the following command to run the application. Be sure to replace <code>EAP7_HOME</code> with the path to your JBoss EAP installation.
77
+
<pre><code>For Linux: EAP7_HOME/bin/appclient.sh ear/target/app-client.ear#simpleClient.jar Hello from command line
78
+
For Windows: EAP7_HOME\bin\appclient.bat ear\target\app-client.ear#simpleClient.jar Hello from command line
79
+
</code></pre>
80
+
</li>
81
+
<li>
82
+
<p>Review the result. The client outputs the following information provided by the server application:</p>
83
+
<pre><code>[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) Main started with arguments
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-##) Hello from StatelessSessionBean@myhost
86
+
</code></pre>
87
+
<p>This output shows that the <code>ServerApplication</code> is called at the jboss.node <code>myhost</code>. The application client connected automatically a server on the same machine.</p>
88
+
</li>
89
+
<li>
90
+
<p>Review the server log files to see the bean invocations on the server.</p>
91
+
<pre><code> ClientContext is here = {Client =dev84, jboss.source-address=localhost/127.0.0.1:45315}
92
+
</code></pre>
93
+
</li>
94
+
</ol>
95
+
<h2><ahref="#access-the-remote-client-application-from-a-different-machine" id="access-the-remote-client-application-from-a-different-machine">Access the Remote Client Application from a Different Machine</a></h2>
96
+
<p>This example shows how to invoke an EJB from a remote standalone Java EE application on a different machine. In this case, the client needs to define a properties file to define properties to connect and authenticate to the server. The properties file is passed on the command line using the <code>--ejb-client-properties</code> argument.</p>
97
+
<h3><ahref="#configure-machine-1-remote-server-machine" id="configure-machine-1-remote-server-machine">Configure Machine_1 (Remote Server Machine)</a></h3>
98
+
<ol>
99
+
<li>Install JBoss EAP on this machine.</li>
100
+
<li>Add the application users to the JBoss EAP server on this machine as described above.</li>
101
+
<li>Start the JBoss EAP server with the following command. Be sure to replace <code>MACHINE_1_IP_ADDRESS</code> with the IP address of this machine. These arguments make the server accessible to the network.
<li>Install JBoss EAP on this server. There is no need to add the application users to this server.</li>
110
+
<li>Download the <code>app-client</code> quickstart to this machine.</li>
111
+
<li>Create a <code>jboss-ejb-client.properties</code> file. This file can be located anywhere in the file system, but for ease of demonstration, we create it in the root directory of this quickstart. Add the following content, replacing <code>MACHINE_1_IP_ADDRESS</code> with the IP address of <code>Machine_1</code>.
<li>Be sure that the quickstart deployed successfully and the server is running on <code>Machine_1</code> as described above.</li>
129
+
<li>Type this command to run the <code>app-client</code> application:
130
+
<pre><code>For Linux: EAP7_HOME/bin/appclient.sh --ejb-client-properties=ejb-client.properties ear/target/app-client.ear#simpleClient.jar Hello from command line
131
+
For Windows: EAP7_HOME\bin\appclient.bat --ejb-client-properties=ejb-client.properties ear\target\app-client.ear#simpleClient.jar Hello from command line
132
+
</code></pre>
133
+
</li>
134
+
<li>
135
+
<p>Review the result. The client outputs the following information, which was provided by the application:</p>
136
+
<pre><code>[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) Main started with arguments
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-##) Hello from StatelessSessionBean@theOtherHOST
139
+
</code></pre>
140
+
<p>This output shows that the <code>ServerApplication</code> is called at the jboss.node <code>theOtherHOST</code>.</p>
141
+
</li>
142
+
<li>
143
+
<p>Review the server log files on the remote machine to see the bean invocations on the server.</p>
144
+
<pre><code> ClientContext is here = {Client =dev84, jboss.source-address=localhost/127.0.0.1:45315}
145
+
</code></pre>
146
+
<p>As shown above, the connected server(s) can be configured using the properties file. It is also possible to connect multiple servers or a cluster using the same <code>jboss-ejb-client.properties</code> file.</p>
147
+
</li>
148
+
</ol>
149
+
<h2><ahref="#undeploy-the-archive-from-the-local-machine" id="undeploy-the-archive-from-the-local-machine">Undeploy the Archive from the Local Machine</a></h2>
150
+
<p>Follow these instructions if you are testing the quickstart on the same machine.</p>
151
+
<ol>
152
+
<li>Make sure you have started the JBoss EAP server on the machine where the quickstart is deployed as described above.</li>
153
+
<li>Open a command prompt on that server and navigate to the root directory of this quickstart.</li>
154
+
<li>When you are finished testing, type this command to undeploy the archive from the local machine.
155
+
<pre><code>mvn wildfly:undeploy
156
+
</code></pre>
157
+
</li>
158
+
</ol>
159
+
<h2><ahref="#undeploy-the-archive-from-the-remote-machine" id="undeploy-the-archive-from-the-remote-machine">Undeploy the Archive from the Remote Machine</a></h2>
160
+
<p>Follow these instructions if you are testing the quickstart on a different machine.</p>
161
+
<ol>
162
+
<li>Make sure you have started the JBoss EAP server on the remote server machine, <code>Machine_1</code>, where the quickstart is deployed as described above.</li>
163
+
<li>Open a command prompt on the local client machine, <code>Machine_2</code>, and navigate to the root directory of this quickstart.</li>
164
+
<li>When you are finished testing, type this command to undeploy the archive from the remote server machine, <code>Machine_1</code>.
0 commit comments