Skip to content

Commit 73fcb0b

Browse files
authored
Merge pull request #62 from OpenLiberty/staging
Merge staging to prod: Update to MP6 and JEE10
2 parents 1b5358d + 2294335 commit 73fcb0b

File tree

73 files changed

+737
-356
lines changed

Some content is hidden

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

73 files changed

+737
-356
lines changed

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Maven generated
2+
target/
3+
4+
# Eclipse generated
5+
.apt_generated/
6+
.settings/
7+
.project
8+
.classpath
9+
.factorypath
10+
.metadata
11+
RemoteSystemsTempFiles
12+
MANIFEST.MF
13+
14+
# MacOS system files
15+
.DS_Store
16+
17+
# Asciidoc rendered
18+
README.html
19+
20+
# Zip files
21+
*.zip

LICENSE

Lines changed: 398 additions & 0 deletions
Large diffs are not rendered by default.

README.adoc

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022 IBM Corporation and others.
1+
// Copyright (c) 2023 IBM Corporation and others.
22
// Licensed under Creative Commons Attribution-NoDerivatives
33
// 4.0 International (CC BY-ND 4.0)
44
// https://creativecommons.org/licenses/by-nd/4.0/
@@ -161,8 +161,8 @@ Dockerfiles are already set up for you. Build your Docker images with the follow
161161

162162
[role='command']
163163
----
164-
docker build -t system:1.0-java8-SNAPSHOT --build-arg JAVA_VERSION=java8 system/.
165164
docker build -t system:1.0-java11-SNAPSHOT --build-arg JAVA_VERSION=java11 system/.
165+
docker build -t system:1.0-java17-SNAPSHOT --build-arg JAVA_VERSION=java17 system/.
166166
docker build -t graphql:1.0-SNAPSHOT graphql/.
167167
docker build -t query:1.0-SNAPSHOT query/.
168168
----
@@ -197,7 +197,7 @@ To access the client service, visit the http://localhost:9084/openapi/ui/[^] URL
197197

198198
=== Try the query operations
199199

200-
From the OpenAPI UI, test the read operation at the `GET /query/system/{hostname}` endpoint. This request retrieves the system properties for the `hostname` specified. The following example shows what happens when the `hostname` is set to `system-java8`, but you can try out the operations using the hostname `system-java11` as well:
200+
From the OpenAPI UI, test the read operation at the `GET /query/system/{hostname}` endpoint. This request retrieves the system properties for the `hostname` specified. The following example shows what happens when the `hostname` is set to `system-java11`, but you can try out the operations using the hostname `system-java17` as well:
201201

202202
endif::[]
203203

@@ -209,10 +209,10 @@ To access the client service, there are several available REST endpoints that te
209209

210210
First, make a GET request to the ***/query/system/{hostname}*** endpoint by the following command. This request retrieves the system properties for the specified ***hostname***.
211211

212-
The ***hostname*** is set to ***system-java8***. You can try out the operations using the hostname ***system-java11*** as well.
212+
The ***hostname*** is set to ***system-java11***. You can try out the operations using the hostname ***system-java17*** as well.
213213

214214
```bash
215-
curl -s 'http://localhost:9084/query/system/system-java8' | jq
215+
curl -s 'http://localhost:9084/query/system/system-java11' | jq
216216
```
217217
You can expect a response similar to the following example:
218218

@@ -221,36 +221,36 @@ endif::[]
221221
[role='no_copy']
222222
----
223223
{
224-
"hostname": "system-java8",
224+
"hostname": "system-java11",
225225
"java": {
226-
"vendor": "International Business Machines Corporation",
227-
"version": "1.8.0_312"
226+
"vendor": "IBM Corporation",
227+
"version": "11.0.18"
228228
},
229229
"osArch": "amd64",
230230
"osName": "Linux",
231-
"osVersion": "5.10.25-linuxkit",
231+
"osVersion": "5.15.0-67-generic",
232232
"systemMetrics": {
233-
"heapSize": 2086993920,
233+
"heapSize": 536870912,
234234
"nonHeapSize": -1,
235-
"processors": 8
235+
"processors": 2
236236
},
237237
"username": "default"
238238
}
239239
----
240240

241241
ifndef::cloud-hosted[]
242242

243-
You can retrieve the information about the resource usage of any number of system services at the `GET /query/systemLoad/{hostnames}` endpoint. The following example shows what happens when the `hostnames` are set to `system-java8,system-java11`:
243+
You can retrieve the information about the resource usage of any number of system services at the `GET /query/systemLoad/{hostnames}` endpoint. The following example shows what happens when the `hostnames` are set to `system-java11,system-java17`:
244244

245245
endif::[]
246246

247247
ifdef::cloud-hosted[]
248248

249249
You can retrieve the information about the resource usage of any number of system services by making a GET request at ***/query/systemLoad/{hostnames}*** endpoint.
250-
The ***hostnames*** are set to ***system-java8,system-java11***.
250+
The ***hostnames*** are set to ***system-java11,system-java17***.
251251

252252
```bash
253-
curl -s 'http://localhost:9084/query/systemLoad/system-java8,system-java11' | jq
253+
curl -s 'http://localhost:9084/query/systemLoad/system-java11,system-java17' | jq
254254
```
255255

256256
You can expect the following response is similar to the following example:
@@ -261,19 +261,19 @@ endif::[]
261261
----
262262
[
263263
{
264-
"hostname": "system-java8",
264+
"hostname": "system-java11",
265265
"loadData": {
266-
"heapUsed": 34251904,
267-
"loadAverage": 0.11,
268-
"nonHeapUsed": 84034688
266+
"heapUsed": 30090920,
267+
"loadAverage": 0.08,
268+
"nonHeapUsed": 87825316
269269
}
270270
},
271271
{
272-
"hostname": "system-java11",
272+
"hostname": "system-java17",
273273
"loadData": {
274-
"heapUsed": 41953280,
275-
"loadAverage": 0.11,
276-
"nonHeapUsed": 112506520
274+
"heapUsed": 39842888,
275+
"loadAverage": 0.08,
276+
"nonHeapUsed": 93098960
277277
}
278278
}
279279
]
@@ -282,12 +282,12 @@ endif::[]
282282
ifndef::cloud-hosted[]
283283
=== Try the mutation operation
284284

285-
You can also make requests to add a note to a system service at the `POST /query/mutation/system/note` endpoint. To add a note to the system service running on Java 8, specify the following in the request body:
285+
You can also make requests to add a note to a system service at the `POST /query/mutation/system/note` endpoint. To add a note to the system service running on Java 11, specify the following in the request body:
286286

287287
[role='command']
288288
----
289289
{
290-
"hostname": "system-java8",
290+
"hostname": "system-java11",
291291
"text": "I am trying out GraphQL on Open Liberty!"
292292
}
293293
----
@@ -302,17 +302,16 @@ You can also make POST requests to add a note to a system service at the ***/que
302302
To add a note to the system service running on Java 8, run the following command:
303303

304304
```bash
305-
curl -i -X 'POST' 'http://localhost:9084/query/mutation/system/note' -H 'Content-Type: application/json' -d '{"hostname": "system-java8","text": "I am trying out GraphQL on Open Liberty!"}'
305+
curl -i -X 'POST' 'http://localhost:9084/query/mutation/system/note' -H 'Content-Type: application/json' -d '{"hostname": "system-java11","text": "I am trying out GraphQL on Open Liberty!"}'
306306
```
307307

308308
You will recieve a `200` response code, similar to below, if the request is processed succesfully.
309309

310310
```
311311
HTTP/1.1 200 OK
312-
X-Powered-By: Servlet/4.0
313-
Date: Fri, 20 May 2022 19:11:46 GMT
314-
Content-Length: 0
315312
Content-Language: en-US
313+
Content-Length: 0
314+
Date: Fri, 21 Apr 2023 14:17:47 GMT
316315
```
317316
endif::[]
318317

@@ -394,13 +393,13 @@ QueryResourceIT.java
394393
include::finish/query/src/test/java/it/io/openliberty/guides/query/QueryResourceIT.java[]
395394
----
396395

397-
Define the [hotspot=systemContainer file=2]`systemContainer` test container to start up the `system-java8` image, the [hotspot=graphqlContainer file=2]`graphqlContainer` test container to start up the `graphql` image, and the [hotspot=libertyContainer file=2]`libertyContainer` test container to start up the `query` image. Make sure that the containers use the same network.
396+
Define the [hotspot=systemContainer file=2]`systemContainer` test container to start up the `system-java11` image, the [hotspot=graphqlContainer file=2]`graphqlContainer` test container to start up the `graphql` image, and the [hotspot=libertyContainer file=2]`libertyContainer` test container to start up the `query` image. Make sure that the containers use the same network.
398397

399398
The [hotspot=testcontainers file=2]`@Testcontainers` annotation finds all fields that are annotated with the [hotspot=container file=2]`@Container` annotation and calls their container lifecycle methods. The `static` function declaration on each container indicates that this container will be started only once before any test method is executed and stopped after the last test method is executed.
400399

401-
The [hotspot=testGetSystem file=2]`testGetSystem()` verifies the `/query/system/{hostname}` endpoint with `hostname` set to `system-java8`.
400+
The [hotspot=testGetSystem file=2]`testGetSystem()` verifies the `/query/system/{hostname}` endpoint with `hostname` set to `system-java11`.
402401

403-
The [hotspot=testGetSystemLoad file=2]`testGetSystemLoad()` verifies the `/query/systemLoad/{hostnames}` endpoint with `hostnames` set to `system-java8`.
402+
The [hotspot=testGetSystemLoad file=2]`testGetSystemLoad()` verifies the `/query/systemLoad/{hostnames}` endpoint with `hostnames` set to `system-java11`.
404403

405404
The [hotspot=testEditNote file=2]`testEditNote()` verifies the mutation operation at the `/query/mutation/system/note` endpoint.
406405

finish/graphql/pom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<packaging>war</packaging>
1111

1212
<properties>
13-
<maven.compiler.source>1.8</maven.compiler.source>
14-
<maven.compiler.target>1.8</maven.compiler.target>
13+
<maven.compiler.source>11</maven.compiler.source>
14+
<maven.compiler.target>11</maven.compiler.target>
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1616
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1717
<!-- Liberty configuration -->
@@ -24,13 +24,13 @@
2424
<dependency>
2525
<groupId>jakarta.platform</groupId>
2626
<artifactId>jakarta.jakartaee-api</artifactId>
27-
<version>9.1.0</version>
27+
<version>10.0.0</version>
2828
<scope>provided</scope>
2929
</dependency>
3030
<dependency>
3131
<groupId>org.eclipse.microprofile</groupId>
3232
<artifactId>microprofile</artifactId>
33-
<version>5.0</version>
33+
<version>6.0</version>
3434
<type>pom</type>
3535
<scope>provided</scope>
3636
</dependency>
@@ -53,19 +53,19 @@
5353
<dependency>
5454
<groupId>org.junit.jupiter</groupId>
5555
<artifactId>junit-jupiter</artifactId>
56-
<version>5.8.2</version>
56+
<version>5.9.2</version>
5757
<scope>test</scope>
5858
</dependency>
5959
<dependency>
6060
<groupId>org.jboss.resteasy</groupId>
6161
<artifactId>resteasy-client</artifactId>
62-
<version>6.0.0.Final</version>
62+
<version>6.2.3.Final</version>
6363
<scope>test</scope>
6464
</dependency>
6565
<dependency>
6666
<groupId>org.jboss.resteasy</groupId>
6767
<artifactId>resteasy-json-binding-provider</artifactId>
68-
<version>6.0.0.Final</version>
68+
<version>6.2.3.Final</version>
6969
<scope>test</scope>
7070
</dependency>
7171
<dependency>
@@ -96,13 +96,13 @@
9696
<plugin>
9797
<groupId>org.apache.maven.plugins</groupId>
9898
<artifactId>maven-surefire-plugin</artifactId>
99-
<version>2.22.2</version>
99+
<version>3.0.0</version>
100100
</plugin>
101101
<!-- Plugin to run functional tests -->
102102
<plugin>
103103
<groupId>org.apache.maven.plugins</groupId>
104104
<artifactId>maven-failsafe-plugin</artifactId>
105-
<version>2.22.2</version>
105+
<version>3.0.0</version>
106106
<configuration>
107107
<systemPropertyVariables>
108108
<http.port>${liberty.var.default.http.port}</http.port>

finish/graphql/src/main/java/io/openliberty/guides/graphql/GraphQLService.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
/*******************************************************************************
33
* Copyright (c) 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
5-
* are made available under the terms of the Eclipse Public License v1.0
5+
* are made available under the terms of the Eclipse Public License 2.0
66
* which accompanies this distribution, and is available at
7-
* http://www.eclipse.org/legal/epl-v10.html
7+
* http://www.eclipse.org/legal/epl-2.0/
88
*
9-
* Contributors:
10-
* IBM Corporation - Initial implementation
9+
* SPDX-License-Identifier: EPL-2.0
1110
*******************************************************************************/
1211
// end::copyright[]
1312
package io.openliberty.guides.graphql;

finish/graphql/src/main/java/io/openliberty/guides/graphql/client/SystemClient.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
/*******************************************************************************
33
* Copyright (c) 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
5-
* are made available under the terms of the Eclipse Public License v1.0
5+
* are made available under the terms of the Eclipse Public License 2.0
66
* which accompanies this distribution, and is available at
7-
* http://www.eclipse.org/legal/epl-v10.html
7+
* http://www.eclipse.org/legal/epl-2.0/
88
*
9-
* Contributors:
10-
* IBM Corporation - Initial implementation
9+
* SPDX-License-Identifier: EPL-2.0
1110
*******************************************************************************/
1211
// end::copyright[]
1312
package io.openliberty.guides.graphql.client;

finish/graphql/src/main/java/io/openliberty/guides/graphql/client/UnknownUriException.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
/*******************************************************************************
33
* Copyright (c) 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
5-
* are made available under the terms of the Eclipse Public License v1.0
5+
* are made available under the terms of the Eclipse Public License 2.0
66
* which accompanies this distribution, and is available at
7-
* http://www.eclipse.org/legal/epl-v10.html
7+
* http://www.eclipse.org/legal/epl-2.0/
88
*
9-
* Contributors:
10-
* IBM Corporation - Initial implementation
9+
* SPDX-License-Identifier: EPL-2.0
1110
*******************************************************************************/
1211
// end::copyright[]
1312
package io.openliberty.guides.graphql.client;

finish/graphql/src/main/java/io/openliberty/guides/graphql/client/UnknownUriExceptionMapper.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
/*******************************************************************************
33
* Copyright (c) 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
5-
* are made available under the terms of the Eclipse Public License v1.0
5+
* are made available under the terms of the Eclipse Public License 2.0
66
* which accompanies this distribution, and is available at
7-
* http://www.eclipse.org/legal/epl-v10.html
7+
* http://www.eclipse.org/legal/epl-2.0/
88
*
9-
* Contributors:
10-
* IBM Corporation - Initial implementation
9+
* SPDX-License-Identifier: EPL-2.0
1110
*******************************************************************************/
1211
// end::copyright[]
1312
package io.openliberty.guides.graphql.client;

finish/graphql/src/main/liberty/config/server.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<server description="Sample Liberty server">
22
<featureManager>
3-
<feature>restfulWS-3.0</feature>
4-
<feature>jsonb-2.0</feature>
5-
<feature>jsonp-2.0</feature>
6-
<feature>cdi-3.0</feature>
3+
<feature>restfulWS-3.1</feature>
4+
<feature>jsonb-3.0</feature>
5+
<feature>jsonp-2.1</feature>
6+
<feature>cdi-4.0</feature>
77
<feature>mpConfig-3.0</feature>
88
<feature>mpRestClient-3.0</feature>
99
<feature>mpGraphQL-2.0</feature>

finish/graphql/src/main/webapp/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (c) 2022 IBM Corp.
2+
Copyright (c) 2022, 2023 IBM Corp.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -41,13 +41,13 @@ <h2>Eclipse MicroProfile</h2>
4141
<p>
4242
For more information about the features used in this application, see the Open Liberty documentation:
4343
<ul>
44-
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-5.0.html" target="_blank" rel="noopener noreferrer">MicroProfile 5.0</a></li>
44+
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-6.0.html" target="_blank" rel="noopener noreferrer">MicroProfile 6.0</a></li>
4545
<li><a href="https://openliberty.io/docs/ref/feature/mpGraphQL-1.0.html" target="_blank" rel="noopener noreferrer">GraphQL 1.0</a></li>
4646
<li><a href="https://openliberty.io/docs/ref/feature/#mpConfig-3.0.html" target="_blank" rel="noopener noreferrer">MicroProfile Config 3.0</a></li>
4747
<li><a href="https://openliberty.io/docs/ref/feature/#mpRestClient-3.0.html" target="_blank" rel="noopener noreferrer">MicroProfile Rest Client 3.0</a></li>
48-
<li><a href="https://openliberty.io/docs/ref/feature/#cdi-4.0.html" target="_blank" rel="noopener noreferrer">Contexts and Dependency Injection 4.0</a></li>
49-
<li><a href="https://openliberty.io/docs/ref/feature/#restfulWS-3.0.html" target="_blank" rel="noopener noreferrer">Java RESTful Services 3.0</a></li>
50-
<li><a href="https://openliberty.io/docs/ref/feature/#jsonb-3.0.html" target="_blank" rel="noopener noreferrer">JavaScript Object Notation Binding 3.0</a></li>
48+
<li><a href="https://openliberty.io/docs/ref/feature/#cdi-4.0.html" target="_blank" rel="noopener noreferrer">Jakarta Contexts and Dependency Injection 4.0</a></li>
49+
<li><a href="https://openliberty.io/docs/ref/feature/#restfulWS-3.1.html" target="_blank" rel="noopener noreferrer">Jakarta RESTful Web Services 3.1</a></li>
50+
<li><a href="https://openliberty.io/docs/ref/feature/#jsonb-3.0.html" target="_blank" rel="noopener noreferrer">Jakarta JSON Binding 3.0</a></li>
5151
</ul>
5252
</p>
5353
</div>

0 commit comments

Comments
 (0)