Skip to content

Commit c768e97

Browse files
updates to 26.0.0.7-beta blog -2nd draft
1 parent c242e77 commit c768e97

1 file changed

Lines changed: 36 additions & 18 deletions

File tree

posts/2026-06-30-26.0.0.7-beta.adoc

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
layout: post
3-
title: "Netty‑based HTTP transport in 26.0.0.7-beta"
3+
title: "Jakarta Data 1.1 Beta Features and MicroProfile Health Endpoint Controls in 26.0.0.7-beta"
44
# Do NOT change the categories section
55
categories: blog
66
author_picture: https://avatars3.githubusercontent.com/navaneethsnair1
77
author_github: https://github.com/navaneethsnair1
8-
seo-title: "Netty‑based HTTP transport in 26.0.0.7-beta - OpenLiberty.io"
8+
seo-title: "Jakarta Data 1.1 Beta Features and MicroProfile Health Endpoint Controls in 26.0.0.7-beta - OpenLiberty.io"
99
seo-description: This beta introduces new Jakarta Data 1.1 beta capabilities, including stateful repositories, enhanced query restrictions, and the @First annotation. It also adds configuration-based control over MicroProfile Health REST endpoints when file-based health checks are enabled.
1010
blog_description: This beta introduces new Jakarta Data 1.1 beta capabilities, including stateful repositories, enhanced query restrictions, and the @First annotation. It also adds configuration-based control over MicroProfile Health REST endpoints when file-based health checks are enabled.
1111
open-graph-image: https://openliberty.io/img/twitter_card.jpg
1212
open-graph-image-alt: Open Liberty Logo
1313
---
14-
= Netty‑based HTTP transport in 26.0.0.7-beta
14+
= Jakarta Data 1.1 Beta Features and MicroProfile Health Endpoint Controls in 26.0.0.7-beta
1515
Navaneeth S Nair <https://github.com/navaneethsnair1>
1616
:imagesdir: /
1717
:url-prefix:
@@ -28,7 +28,7 @@ This beta introduces new Jakarta Data 1.1 beta capabilities, including stateful
2828
// // // // // // // //
2929
The link:{url-about}[Open Liberty] 26.0.0.7-beta includes the following beta features (along with link:{url-prefix}/docs/latest/reference/feature/feature-overview.html[all GA features]):
3030

31-
* <<jakarta_data, Preview of some Jakarta Data 1.1 M3 capability>>
31+
* <<jakarta_data, Preview of some Jakarta Data 1.1 M3 capabilities>>
3232
* <<mpHealth_4_0, Disabling mpHealth-4.0 REST endpoints when file-based health checks are enabled>>
3333

3434
// // // // // // // //
@@ -47,22 +47,36 @@ See also link:{url-prefix}/blog/?search=beta&key=tag[previous Open Liberty beta
4747
// Contact/Reviewer: njr-11
4848
// // // // // // // //
4949
[#jakarta_data]
50-
== Preview of some Jakarta Data 1.1 M3 capability
50+
== Preview of some Jakarta Data 1.1 M3 capabilities
5151

52-
The beta release previews some new capability at the Jakarta Data 1.1 Milestone 3 level: stateful repositories, the `@First` annotation, `Restriction` parameters on repository `@Find` and `@Delete` methods, `Constraint` subtype parameters on repository `@Find` and `@Delete` methods. Also included in prior betas are: retrieving a subset or projection of entity attributes and the `@Is` annotation.
52+
The beta release previews some new capabilities at the Jakarta Data 1.1 Milestone 3 level:
5353

54-
Previously, parameter-based `@Find` and `@Delete` methods had no way to filter on conditions other than equality. This limitation can now be overcome by typing the repository method parameter with a Constraint subtype or indicating the Constraint subtype by using the `@Is` annotation. Or, the repository method can include a special parameter of type `Restriction`, and the application can supply one or more restrictions at run time when it starts the repository method. Also, before this point, all Jakarta Data repositories were stateless, in that they operate without externalizing a persistence context to the application. Now, you can define a repository as stateful by using the repository lifecycle method annotations in the `jakarta.data.repository.stateful` package, and the repository operates with a persistence context. Also, repository `Find` methods cannot enforce returning only the first result or the first few results. That capability is now available with the `First` annotation.
54+
* Stateful repositories
55+
* The `@First` annotation
56+
* `Restriction` parameters on repository `@Find` and `@Delete` methods
57+
* `Constraint` subtype parameters on repository `@Find` and `@Delete` methods
58+
59+
Also included in prior betas are:
60+
61+
* Retrieving a subset or projection of entity attributes
62+
* The `@Is` annotation
63+
64+
Previously, parameter-based `@Find` and `@Delete` methods had no way to filter on conditions other than equality. This limitation can now be overcome by typing the repository method parameter with a Constraint subtype or by indicating the Constraint subtype using the `@Is` annotation. Alternatively, the repository method can include a special parameter of type `Restriction`, allowing the application to supply one or more restrictions at run time when it invokes the repository method.
65+
66+
Prior to this release, all Jakarta Data repositories were stateless, operating without externalizing a persistence context to the application. Now, you can define a repository as stateful by using the repository lifecycle method annotations in the `jakarta.data.repository.stateful` package, enabling the repository to operate with a persistence context.
67+
68+
Previously, repository `Find` methods could not enforce returning only the first result or the first few results. That capability is now available with the `@First` annotation.
5569

5670
In Jakarta Data, you write simple Java objects that are called *Entities* to represent data, and interfaces that are called *Repositories* to define operations on data. You inject a Repository into your application and use it. The implementation of the Repository is automatically provided for you!
5771

58-
Start by defining an entity class that corresponds to your data. With relational databases, the entity class corresponds to a database table and the entity properties (public methods and fields of the entity class) generally correspond to the columns of the table.
72+
Start by defining an entity class that corresponds to your data. With relational databases, the entity class corresponds to a database table. The entity properties, which include the public methods and fields of the entity class, generally correspond to the columns of the table.
5973

6074
An entity class can be:
6175

6276
* annotated with `jakarta.persistence.Entity` and related annotations from Jakarta Persistence.
6377
* a Java class without entity annotations, in which case the primary key is inferred from an entity property named `id` or ending with `Id`. Entity property named `version` designates an automatically incremented version column.
6478

65-
Following shows an example of a simple entity.
79+
The following shows an example of a simple entity:
6680

6781
[source,java]
6882
----
@@ -106,9 +120,10 @@ public interface _Product {
106120
}
107121
----
108122

109-
The first half of the static metamodel class includes constants for each of the entity attribute names so that you don't need to otherwise hardcode string values into your application. The second half of the static metamodel class provides a special instance for each entity attribute, from which you can build restrictions and sorting to apply to queries at run time. You can do many powerful things with these repository queries.
123+
The first half of the static metamodel class includes constants for each of the entity attribute names so that you don't need to otherwise hardcode string values into your application. The second half of the static metamodel class provides a special instance for each entity attribute, from which you can build restrictions and sorting to apply to queries at run time. These repository queries enable powerful and flexible data operations.
110124

111-
Built-in interfaces like BasicRepository and CrudRepository can be inherited to add general-purpose methods for inserting, updating, deleting, and querying entities. When a stateful repository is composed such as the following, the built-in interface `DataRepository` can be inherited. With this interface, you can define at least one stateful repository method by using the `Detach`, `Merge`, `Persist`, `Refresh`, or `Remove` annotations. After the repository is made stateful, the repository finds methods that you define to return entities that also operate within a persistence context.
125+
Built-in interfaces like `BasicRepository` and `CrudRepository` can be extended to add general-purpose methods for inserting, updating, deleting, and querying entities.
126+
To compose a stateful repository, extend the built-in `DataRepository` interface. This interface allows you to define at least one stateful repository method using the `@Detach`, `@Merge`, `@Persist`, `@Refresh`, or `@Remove` annotations. Once the repository is stateful, any find methods you define will return entities that operate within a persistence context.
112127

113128
[source,java]
114129
----
@@ -233,17 +248,20 @@ To learn more about this feature, see the following resources:
233248
[#mpHealth_4_0]
234249
== Disabling mpHealth-4.0 REST endpoints when file-based health checks are enabled
235250

236-
The `mpHealth-4.0` feature enables a MicroProfile Health 4.0 runtime for the OpenLiberty server. This runtime supports file-based health check mechanism as an alternative health check strategy to the `/health/` REST endpoints. When the file-based health check mechanism is enabled, you can now disable the health check `/health/started, /health/live, /health/ready` REST endpoints, with server configuration attributes.
251+
The mpHealth-4.0 feature enables a MicroProfile Health 4.0 runtime for the Open Liberty server. This runtime supports a file-based health check mechanism as an alternative to the `/health/` REST endpoints. When the file-based health check mechanism is enabled, you can now disable the `/health/started`, `/health/live`, and `/health/ready` REST endpoints using server configuration attributes.
252+
253+
Previously, when file-based health checks were enabled, the REST-based MicroProfile Health endpoints were still registered and accessible. This behavior was often redundant for Kubernetes deployments that rely on file-based health checks, where users typically configure probes using the `exec` strategy rather than `httpGet` or `gRPC`. In these scenarios, the REST health endpoints are not used.
254+
255+
To address this redundancy, the beta release introduces a new optional `mpHealth` server configuration attribute that allows REST health endpoints to be disabled when file-based health checks are enabled.
237256

238-
Previously, when file‑based health checks were enabled, the REST‑based MicroProfile Health endpoints were still registered and accessible. This behavior was often redundant for Kubernetes deployments that rely on file‑based health checks, where users typically configure probes by using the exec strategy rather than httpGet or gRPC. In these scenarios, the REST health endpoints are not used.
257+
The `mpHealth-4.0` feature adds a new optional `enableEndpoints="false"` attribute to the `mpHealth` server configuration element in `server.xml` file. An equivalent environment variable, `MP_HEALTH_ENABLE_ENDPOINTS=false`, is also supported.
239258

240-
To address this redundancy, the beta release introduces a new optional mpHealth server configuration attribute that allows REST health endpoints to be disabled when file‑based health checks are enabled.
259+
When this option is set to `false` and file-based health checks are enabled, the server does not register or expose the MicroProfile Health REST endpoints (`/health, /health/live, /health/ready, /health/started`). Requests to these endpoints return '404 Not Found' response.
241260

242-
The `mpHealth-4.0` feature adds a new optional `enableEndpoints="false"` attribute to the `mpHealth` server configuration element in `server.xml`. An equivalent environment variable, `MP_HEALTH_ENABLE_ENDPOINTS=false`, is also supported. When this option is set to `false` and file-based health checks are enabled, the server does not register or expose the MicroProfile Health REST endpoints (`/health, /health/live, /health/ready, /health/started`). File-based health checks can be enabled with the `checkInterval` configuration attribute or the `MP_HEALTH_CHECK_INTERVAL` environment variable. Requests to these endpoints return 404 – Not Found.
261+
File-based health checks can be enabled with the `checkInterval` configuration attribute or the `MP_HEALTH_CHECK_INTERVAL` environment variable.
243262

244-
If both the environment variable and server.xml configuration are specified, the server.xml setting takes precedence at runtime.
263+
If both the environment variable and `server.xml` file configuration are specified, the `server.xml` setting takes precedence at runtime.
245264

246-
server.xml
247265
[source,xml]
248266
----
249267
<server>
@@ -257,7 +275,7 @@ server.xml
257275
</server>
258276
----
259277

260-
If either the `enableEndpoints` configuration attribute or the MP_HEALTH_ENABLE_ENDPOINTS environment variable is NOT set, the default value is true, and the health check REST endpoints are enabled and exposed.
278+
If either the `enableEndpoints` configuration attribute or the `MP_HEALTH_ENABLE_ENDPOINTS` environment variable is not set, the default value is `true`, and the health check REST endpoints are enabled and exposed.
261279

262280
*Note*: This capability is supported only when the file‑based health check mechanism is enabled. If file-based health checks are not enabled and the new `enableEndpoints` configuration attribute or environment variable is specified, a warning message is logged. The REST health endpoints remain enabled by default.
263281

0 commit comments

Comments
 (0)