Skip to content

Commit 465e5a2

Browse files
committed
Add generated docs
1 parent 87f5970 commit 465e5a2

File tree

365 files changed

+16414
-2459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

365 files changed

+16414
-2459
lines changed

.gitignore

-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ bin
66
*/.gitignore
77
.gitkeep
88
/helloworld-jsp
9-
README.html
10-
SERVICES.html
11-
CHANGES.html
12-
CONTRIBUTING.html
13-
RELEASE_PROCEDURE.html
149
out
1510
nb-configuration.xml
1611
nbactions.xml

README.html

+230
Large diffs are not rendered by default.

README.md

+115-15
Large diffs are not rendered by default.

RELEASE_PROCEDURE.html

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head><title>Testing the quickstarts</title>
4+
<link href="http://static.jboss.org/ffe/0/www/vendor/redhat/documentation.css" rel="stylesheet"></link>
5+
<link href="http://static.jboss.org/ffe/0/www/vendor/redhat/pygments.css" rel="stylesheet"></link>
6+
</head>
7+
<body><h1><a href="#quickstarts-release-procedure" id="quickstarts-release-procedure">Quickstarts Release Procedure</a></h1>
8+
<h2><a href="#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 &quot;standalone-full&quot; 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>
10+
<pre><code> mvn clean verify wildfly:deploy wildfly:undeploy -Parq-remote -P-requires-postgres,-requires-full,-complex-dependencies,-requires-xts
11+
</code></pre>
12+
<p>Or, to run those only those quickstarts that require the full profile</p>
13+
<pre><code> mvn clean verify wildfly:deploy wildfly:undeploy -Parq-remote -P-requires-postgres,-default,-complex-dependencies,-requires-xts
14+
</code></pre>
15+
<p>And so on.</p>
16+
<h2><a href="#quickstarts-in-other-repositories" id="quickstarts-in-other-repositories">Quickstarts in other repositories</a></h2>
17+
<p>If the quickstarts are stored in another repository, you may wish to merge them in from there, do this:</p>
18+
<ol>
19+
<li>
20+
<p>Add the other repo as a remote</p>
21+
<pre><code> git remote add -f &lt;other repo&gt; &lt;other repo url&gt;
22+
</code></pre>
23+
</li>
24+
<li>
25+
<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>
26+
<pre><code> git merge &lt;tag&gt; -s recursive -Xtheirs -m &quot;Merge &lt;Other repository name&gt; '&lt;Tag&gt;'&quot;
27+
</code></pre>
28+
</li>
29+
<li>
30+
<p>Review and push to upstream</p>
31+
<pre><code> git push upstream HEAD:master
32+
</code></pre>
33+
</li>
34+
</ol>
35+
<h2><a href="#rendering-markdown" id="rendering-markdown">Rendering Markdown</a></h2>
36+
<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 &amp; 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><a href="#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 <a href="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.
49+
<pre><code> &lt;profile&gt;
50+
&lt;id&gt;release&lt;/id&gt;
51+
&lt;properties&gt;
52+
&lt;gpg.passphrase&gt;myPassPhrase&lt;/gpg.passphrase&gt;
53+
&lt;/properties&gt;
54+
&lt;/profile&gt;
55+
</code></pre>
56+
</li>
57+
<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> &lt;server&gt;
59+
&lt;id&gt;jboss-releases-repository&lt;/id&gt;
60+
&lt;username&gt;myUserName&lt;/username&gt;
61+
&lt;password&gt;myPassword&lt;/password&gt;
62+
&lt;/server&gt;
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>
67+
<pre><code> &lt;pluginGroups&gt;
68+
&lt;pluginGroup&gt;org.sonatype.plugins&lt;/pluginGroup&gt;
69+
&lt;/pluginGroups&gt;
70+
</code></pre>
71+
</li>
72+
</ol>
73+
<h2><a href="#release-procedure" id="release-procedure">Release Procedure</a></h2>
74+
<ol>
75+
<li>Make sure you have access to rsync files to <code>filemgmt.jboss.org/download_htdocs/jbossas</code></li>
76+
<li>Release the archetypes</li>
77+
<li>Regenerate the quickstart based on archetypes
78+
<pre><code> dist/release-utils.sh -r
79+
</code></pre>
80+
</li>
81+
<li>
82+
<p>Release</p>
83+
<pre><code> dist/release.sh -s &lt;old snapshot version&gt; -r &lt;release version&gt;
84+
</code></pre>
85+
<p>This will update the version number, commit and tag, build the distro zip and upload it to &lt;download.jboss.org&gt;. Then it will reset the version number back to the snapshot version number.</p>
86+
</li>
87+
</ol>
88+
</body>
89+
</html>

RELEASE_PROCEDURE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Quickstarts Release Procedure
44
Testing the quickstarts
55
-----------------------
66

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:
88

99
mvn clean verify wildfly:deploy wildfly:undeploy -Parq-remote -P-requires-postgres,-requires-full,-complex-dependencies,-requires-xts
1010

app-client/README.html

+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head><title> app-client: Use the JBoss EAP Application Client Container</title>
4+
<link href="http://static.jboss.org/ffe/0/www/vendor/redhat/documentation.css" rel="stylesheet"></link>
5+
<link href="http://static.jboss.org/ffe/0/www/vendor/redhat/pygments.css" rel="stylesheet"></link>
6+
</head>
7+
<body><h1><a href="#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 />
12+
Target Product: JBoss EAP<br />
13+
Source: <a href="https://github.com/jbossas/eap-quickstarts/">https://github.com/jbossas/eap-quickstarts/</a></p>
14+
<h2><a href="#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>
17+
<table>
18+
<thead>
19+
<tr><th align="left"> <strong>Sub-project</strong> </th><th align="left"> <strong>Description</strong> </th></tr>
20+
</thead>
21+
<tbody>
22+
<tr><td align="left"> <code>ejb</code> </td><td align="left"> An application that can be called by the <code>client</code>.</td></tr>
23+
<tr><td align="left"> <code>ear</code> </td><td align="left"> The EAR packaging contains the server and client side.</td></tr>
24+
<tr><td align="left"> <code>client-simple</code> </td><td align="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>
28+
<h2><a href="#system-requirements" id="system-requirements">System Requirements</a></h2>
29+
<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 <a href="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><a href="#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: <a href="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><a href="#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>
35+
<table>
36+
<thead>
37+
<tr><th align="left"> <strong>UserName</strong> </th><th align="left"> <strong>Realm</strong> </th><th align="left"> <strong>Password</strong> </th><th align="left"> <strong>Roles</strong> </th></tr>
38+
</thead>
39+
<tbody>
40+
<tr><td align="left"> admin</td><td align="left"> ManagementRealm </td><td align="left"> admin-123 </td><td align="left"> <em>leave blank for none</em> </td></tr>
41+
<tr><td align="left"> quickuser</td><td align="left"> ApplicationRealm </td><td align="left"> quick-123 </td><td align="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: <a href="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><a href="#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><a href="#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><a href="#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
84+
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) [Hello, from, command, line]
85+
[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><a href="#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><a href="#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.
102+
<pre><code>For Linux: EAP7_HOME/bin/standalone.sh -b MACHINE_1_IP_ADDRESS -bmanagement MACHINE_1_IP_ADDRESS
103+
For Windows: EAP7_HOME\bin\standalone.bat -b MACHINE_1_IP_ADDRESS -bmanagement MACHINE_1_IP_ADDRESS
104+
</code></pre>
105+
</li>
106+
</ol>
107+
<h3><a href="#configure-machine-2-local-client-machine" id="configure-machine-2-local-client-machine">Configure Machine_2 (Local Client Machine)</a></h3>
108+
<ol>
109+
<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>.
112+
<pre><code>remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
113+
remote.connections=default
114+
remote.connection.default.host=MACHINE_1_IP_ADDRESS
115+
remote.connection.default.port=8080
116+
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
117+
remote.connection.default.username=quickuser
118+
remote.connection.default.password=quick-123
119+
</code></pre>
120+
</li>
121+
<li>
122+
<p>Open a command prompt and navigate to the root directory of the quickstart.</p>
123+
</li>
124+
<li>Deploy the <code>app-client</code> quickstart to the remote machine using the following command:
125+
<pre><code>mvn clean install wildfly:deploy -Dwildfly.hostname=MACHINE_1_IP_ADDRESS [-Dwildfly.port=9099] -Dwildfly.username=admin -Dwildfly.password=admin-123
126+
</code></pre>
127+
</li>
128+
<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
137+
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) [Hello, from, command, line]
138+
[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><a href="#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><a href="#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>.
165+
<pre><code>mvn wildfly:undeploy -Dwildfly.hostname=MACHINE_1_IP_ADDRESS [-Dwildfly.port=9099] -Dwildfly.username=admin -Dwildfly.password=admin-123
166+
</code></pre>
167+
</li>
168+
</ol>
169+
</body>
170+
</html>

0 commit comments

Comments
 (0)