Skip to content

Commit 48c54e2

Browse files
committed
more content
1 parent 9c62e41 commit 48c54e2

File tree

1 file changed

+43
-29
lines changed

1 file changed

+43
-29
lines changed

README.asciidoc

+43-29
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,31 @@
11
Java EE 7 using Eclipse
22
=======================
33

4+
Project creation
5+
----------------
6+
47
* Create a simple Dynamic Web Project
5-
** Basic app
6-
*** Choose the module version as ``3.1''
7-
*** Add a new configuration for WildFly
8-
*** Add `index.html` in ``WebContent''
9-
*** ``Run as'', ``Run on Server''
10-
*** Change content on `index.html` and show LiveReload
11-
** Servlet
12-
*** Add a new Servlet
13-
*** In Servers tab, select the module, right-click and select ``Restart'' to restart the module
14-
*** Show http://localhost:8080/helloworld/HelloServlet
15-
** Persistence
16-
*** Right-click on project, select ``Properties'', search for ``facet'', enable ``JPA'', click on ``Apply'', talk about ``Further configuration available'' and default data source
17-
** Create a new entity
18-
** Add a primary key
19-
+
20-
[source, java]
21-
----
22-
@Id
23-
private int id;
24-
----
25-
+
26-
** Generate Getter/Setter by clicking ``Source'', ``Getters and Setters''.
27-
** Copy the https://github.com/jboss-developer/jboss-eap-quickstarts/blob/6.3.0.GA/h2-console/h2console.war?raw=true[H2 console war] to the server standalone/deployments directory.
28-
** Start the server and access http://localhost:8080/h2console
29-
** You need to enter the JDBC URL, and credentials. To access the "test" database your application uses, enter these details:
30-
*** JDBC URL: jdbc:h2:mem:test;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1
31-
*** User Name: sa
32-
*** Password: sa
33-
** Add the following properties to `persistence.xml`:
8+
** Choose the module version as ``3.1''
9+
** Add a new configuration for WildFly
10+
** Add `index.html` in ``WebContent''
11+
** ``Run as'', ``Run on Server''
12+
** Change content on `index.html` and show LiveReload
13+
14+
Servlet
15+
-------
16+
17+
* Add a new Servlet
18+
** In Servers tab, select the module, right-click and select ``Restart'' to restart the module
19+
** Show http://localhost:8080/helloworld/HelloServlet
20+
21+
Persistence
22+
-----------
23+
24+
* Right-click on project, select ``Properties'', search for ``facet'', enable ``JPA'', click on ``Apply'', talk about ``Further configuration available'' and default data source
25+
* Create a new entity
26+
* Add a primary key in the wizard. Use `long` datatype and name as `id`.
27+
* Generate Getter/Setter by clicking ``Source'', ``Getters and Setters''.
28+
* Add the following properties to `persistence.xml`:
3429
+
3530
[source.xml]
3631
----
@@ -46,6 +41,25 @@ private int id;
4641
</properties>
4742
----
4843
+
44+
* Show ``server console'' when the application is deployed. Show the generated SQL statements.
45+
46+
Setup console to watch database
47+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48+
49+
* Download https://github.com/jboss-developer/jboss-eap-quickstarts/blob/6.3.0.GA/h2-console/h2console.war?raw=true[H2 console war] to the server `standalone/deployments` directory
50+
+
51+
[source,text]
52+
----
53+
curl -L https://github.com/jboss-developer/jboss-eap-quickstarts/blob/6.3.0.GA/h2-console/h2console.war?raw=true -o h2console.war
54+
----
55+
+
56+
* Start the server and access http://localhost:8080/h2console
57+
* Enter the JDBC URL and credentials. To access the "test" database your application uses, enter these details (everything else is default):
58+
** JDBC URL: jdbc:h2:mem:test;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1
59+
** User Name: sa
60+
** Password: sa
61+
62+
**
4963

5064

5165

0 commit comments

Comments
 (0)