Skip to content

Commit 4cfb36a

Browse files
committed
Merge pull request #1 from javaee-samples/master
Update from upstream
2 parents 3d30dd7 + 9692eb7 commit 4cfb36a

File tree

1,018 files changed

+12488
-9910
lines changed

Some content is hidden

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

1,018 files changed

+12488
-9910
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ target/
55
libs/
66
tmp/
77
node_modules/
8+
jaxws/jaxws-client/src/main/
89

910
# OS Files #
1011
.DS_Store

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: java
2+
3+
jdk:
4+
- oraclejdk8
5+
- oraclejdk7
6+
7+
script: mvn clean install -Ptomee-embedded-arquillian

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM centos/wildfly
2+
ADD jaxrs/jaxrs-client/target/jaxrs-client.war /opt/wildfly/standalone/deployments/

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,29 @@ That's it! Welcome in the community!
109109

110110
## CI Job ##
111111

112-
* [WildFly](https://javaee-support.ci.cloudbees.com/job/javaee7-pull-request-builder/)
113-
* [GlassFish](https://javaee-support.ci.cloudbees.com/job/javaee7-pull-request-builder-glassfish/)
112+
* [WildFly](https://javaee-support.ci.cloudbees.com/job/javaee7-samples-wildfly-8.1/)
113+
* [GlassFish](https://javaee-support.ci.cloudbees.com/job/javaee7-samples-glassfish-4.1/)
114+
* [TomEE](https://javaee-support.ci.cloudbees.com/job/javaee7-samples-tomee-2.0/)
115+
116+
## Run each sample in Docker
117+
118+
* Install Docker client from http://boot2docker.io/
119+
* Build the sample that you want to run as
120+
121+
``mvn clean package -DskipTests``
122+
123+
For example:
124+
125+
``mvn -f jaxrs/jaxrs-client/pom.xml clean package -DskipTests``
126+
127+
* Change the second line in ``Dockerfile`` to specify the location of the generated WAR file
128+
* Run boot2docker and give the command
129+
130+
``docker build -it -p 80:8080 javaee7-sample``
131+
132+
* In a different shell, find out the IP address of the running container as:
133+
134+
``boot2docker ip``
135+
136+
* Access the sample as http://IP_ADDRESS:80/jaxrs-client/webresources/persons. The exact URL would differ based upon the sample.
137+

batch/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Java EE 7 Samples: Batch #
2+
3+
The [JSR 352](https://jcp.org/en/jsr/detail?id=352) specifies a programming model for batch applications and a runtime for scheduling and executing jobs.
4+
5+
## Samples ##
6+
7+
- batchlet-simple
8+
- chunk-checkpoint
9+
- chunk-csv-database
10+
- chunk-exception
11+
- chunk-mapper
12+
- chunk-optional-processor
13+
- chunk-partition
14+
- chunk-simple
15+
- decision
16+
- flow
17+
- batch-listeners
18+
- multiple-steps
19+
- split
20+
- chunk-simple-nobeans
21+
- scheduling
22+
23+
## How to run
24+
25+
More information on how to run can be found at: <https://github.com/javaee-samples/javaee7-samples#how-to-run->
26+
27+

batch/batch-listeners/pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4+
45
<parent>
5-
<groupId>org.javaee7.batch</groupId>
6-
<artifactId>batch-samples</artifactId>
6+
<groupId>org.javaee7</groupId>
7+
<artifactId>batch</artifactId>
78
<version>1.0-SNAPSHOT</version>
89
<relativePath>../pom.xml</relativePath>
910
</parent>
10-
11-
<artifactId>batch-listeners</artifactId>
11+
<artifactId>batch-batch-listeners</artifactId>
1212
<packaging>war</packaging>
13-
<name>Batch Listeners</name>
13+
<name>Java EE 7 Sample: batch - batch-listeners</name>
1414
<description>Batch Listeners - Applying Listeners to Job, Chunk, Step, Reader, Processor and Writer</description>
1515

1616
<dependencies>
1717
<dependency>
1818
<groupId>org.javaee7</groupId>
19-
<artifactId>util-samples</artifactId>
19+
<artifactId>util</artifactId>
2020
</dependency>
2121
</dependencies>
2222
</project>

batch/batch-listeners/src/main/java/org/javaee7/batch/batch/listeners/MyInputRecord.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
*/
66
public class MyInputRecord {
77
private int id;
8-
9-
public MyInputRecord() { }
10-
8+
9+
public MyInputRecord() {
10+
}
11+
1112
public MyInputRecord(int id) {
1213
this.id = id;
1314
}
@@ -19,7 +20,7 @@ public int getId() {
1920
public void setId(int id) {
2021
this.id = id;
2122
}
22-
23+
2324
@Override
2425
public String toString() {
2526
return "MyInputRecord: " + id;

batch/batch-listeners/src/main/java/org/javaee7/batch/batch/listeners/MyItemProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class MyItemProcessor implements ItemProcessor {
1212
@Override
1313
public Object processItem(Object t) {
1414
System.out.println("processItem: " + t);
15-
16-
return (((MyInputRecord)t).getId() % 2 == 0) ? null : new MyOutputRecord(((MyInputRecord)t).getId() * 2);
15+
16+
return (((MyInputRecord) t).getId() % 2 == 0) ? null : new MyOutputRecord(((MyInputRecord) t).getId() * 2);
1717
}
1818
}

batch/batch-listeners/src/main/java/org/javaee7/batch/batch/listeners/MyItemReader.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
*/
1010
@Named
1111
public class MyItemReader extends AbstractItemReader {
12-
12+
1313
private final StringTokenizer tokens;
14-
14+
1515
public MyItemReader() {
1616
tokens = new StringTokenizer("1,2,3,4,5,6,7,8,9,10", ",");
1717
}
18-
18+
1919
@Override
2020
public MyInputRecord readItem() {
2121
if (tokens.hasMoreTokens()) {

batch/batch-listeners/src/main/java/org/javaee7/batch/batch/listeners/MyOutputRecord.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
*/
66
public class MyOutputRecord {
77
private int id;
8-
9-
public MyOutputRecord() { }
10-
8+
9+
public MyOutputRecord() {
10+
}
11+
1112
public MyOutputRecord(int id) {
1213
this.id = id;
1314
}
@@ -19,7 +20,7 @@ public int getId() {
1920
public void setId(int id) {
2021
this.id = id;
2122
}
22-
23+
2324
@Override
2425
public String toString() {
2526
return "MyOutputRecord: " + id;

0 commit comments

Comments
 (0)