Chapter 3. New features and enhancements
JBoss EAP 8.1 introduces the following new features and enhancements.
3.1. Management CLI Copy linkLink copied to clipboard!
3.1.1. New operation to export server configuration as a stream Copy linkLink copied to clipboard!
You can now export your server configuration as XML using the new read-config-as-xml-file operation. This feature works for both standalone servers and managed domains in JBoss EAP. The operation returns a stream that you can either view directly in the management CLI or save to a file for later use.
To display the server configuration, use the operation with the
attachment displaycommand.Example: Display the configuration for a standalone server or a domain
attachment display --operation=:read-config-as-xml-fileExample: Display the configuration for a host
attachment display --operation=/host=<host-name>:read-config-as-xml-fileExample: Display the configuration for a server on a host
attachment display --operation=/host=<host-name>/server=<server-name>:read-config-as-xml-fileTo save the server configuration, use the operation with the
attachment savecommand.Example: Save the configuration for a standalone server or a domain to a file
attachment save --operation=:read-config-as-xml-file --file=<file-name>Example: Save the configuration for a host
attachment save --operation=/host=<host-name>:read-config-as-xml-file --file=<file-name>Example: Display the configuration for a server on a host
attachment save --operation=/host=<host-name>/server=<server-name>:read-config-as-xml-file --file=<file-name>
The read-config-as-xml, which returned the server configuration as a String object has been deprecated due to the introduction of the read-config-as-xml-file operation.
3.1.2. Updated transaction heuristics display Copy linkLink copied to clipboard!
In previous JBoss EAP versions, the management CLI reported a generic transaction HEURISTIC status and participants were designated by a numbered list. For example:
[standalone@localhost:9990 /] /subsystem=transactions/log-store=log-store:read-resource(recursive=true, include-runtime=true)
{
"outcome" => "success",
"result" => {
"expose-all-logs" => false,
"type" => "default",
"transactions" => {"0:ffff0a8004bc:-28a3b85d:66fd4682:10" => {
"age-in-seconds" => "15",
"id" => "0:ffff0a8004bc:-28a3b85d:66fd4682:10",
"jmx-name" => undefined,
"type" => "StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction",
"participants" => {"1" => {
"eis-product-name" => undefined,
"eis-product-version" => undefined,
"jmx-name" => undefined,
"jndi-name" => "1",
"status" => "HEURISTIC",
"type" => "/StateManager/AbstractRecord/XAResourceRecord"
}}
}}
}
}
In JBoss EAP 8.1, the management CLI reports a more precise status: HEURISTIC_COMMIT, HEURISTIC_ROLLBACK, HEURISTIC_HAZARD, or HEURISTIC_MIXED. Participants are designated now by jndi-name. For example:
[standalone@localhost:9990 /] /subsystem=transactions/log-store=log-store:read-resource(recursive=true, include-runtime=true)
{
"outcome" => "success",
"result" => {
"expose-all-logs" => false,
"type" => "default",
"transactions" => {"0:ffff0a83027b:49e508a7:66fbc17e:10" => {
"age-in-seconds" => "6668",
"id" => "0:ffff0a83027b:49e508a7:66fbc17e:10",
"jmx-name" => undefined,
"type" => "StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction",
"participants" => {"java:/MockXAResource" => {
"eis-product-name" => "MockXAResource Test",
"eis-product-version" => "0.1.Mock",
"jmx-name" => undefined,
"jndi-name" => "java:/MockXAResource",
"status" => "HEURISTIC_ROLLBACK",
"type" => "/StateManager/AbstractRecord/XAResourceRecord"
}}
}}
}
}
You may need to update existing scripts and user procedures.
3.2. OpenShift Copy linkLink copied to clipboard!
3.2.1. Configuring OpenShift startup probe through Helm Charts Copy linkLink copied to clipboard!
Startup probe configuration is now available in JBoss EAP using Helm Charts. You can configure startup, readiness and liveness probes. You can also adjust all probe parameters, including timeouts, delays and probe types.
3.2.2. Helm Charts in JBoss EAP 8.1 Copy linkLink copied to clipboard!
JBoss EAP 8.1 provides a Helm chart for building and deploying JBoss EAP 8.1 applications on OpenShift. You can now also build and deploy JBoss EAP applications running on OpenJDK 21.
3.3. Web services Copy linkLink copied to clipboard!
3.3.1. JSON merge patch Copy linkLink copied to clipboard!
JBoss EAP 8.1 supports the use of JSON merge patches. You can use the JSON merge patch feature to change the target resource. The client sends the JSON change directly to the server resource where it is merged to the target resource. The requested Uniform Resource Identifier (URI) is used to identify the target resource.
PATCH /StudentPatchTest/students/1 HTTP/1.1
Content-Type: application/merge-patch+json
Content-Length: 34
Host: localhost:8090
Connection: Keep-Alive
{"firstName":"Green","school":null}
The JSON merge patch feature is enabled by default. To use this feature, annotate the resource method with @Consumes("application/merge-patch+json"). For more information about the JSON merge patch feature, see JSON patch and JSON merge patch in the RESTEasy user guide.
The configuration switch, resteasy.patchfilter.disabled, is set to false by default. For more information about this switch, see Configuration switches in the RESTEasy user guide.
@GET
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Student getStudent(@PathParam("id") long id) {
Student student = studentsMap.get(id);
if (student == null) {
throw new NotFoundException();
}
return student;
}
@PATCH
@Path("/{id}")
@Consumes("application/merge-patch+json")
@Produces(MediaType.APPLICATION_JSON)
public Student mergePatchStudent(@PathParam("id") long id, Student student)
{
if (studentsMap.get(id) == null)
{
throw new NotFoundException();
}
studentsMap.put(id, student);
return student;
}
3.4. Quickstarts and BOMs Copy linkLink copied to clipboard!
3.4.1. HTTP custom mechanism quickstart Copy linkLink copied to clipboard!
An http-custom-mechanism quickstart is now available in JBoss EAP 8.1. This quickstart illustrates how to implement a custom HTTP authentication mechanism and register the mechanism with the elytron subsystem. For more information, see the jboss-eap-quickstarts github repository.
3.4.2. JAX-RS JSON Web Tokens quickstart Copy linkLink copied to clipboard!
A new jaxrs-jwt quickstart is available. It provides an example of a JAX-RS secured application that uses JSON Web Tokens (JWT) for enhanced security. See jboss-eap-quickstarts.
3.5. ActiveMQ Artemis Copy linkLink copied to clipboard!
JBoss EAP 8.1 introduces the new public org.apache.activemq.artemis.client module for accessing messaging classes from user deployments. Previously, no similar public module was available, and applications might have relied on the deprecated internal org.apache.activemq.artemis module instead.
The internal org.apache.activemq.artemis module still exists but was changed to private and refactored. Some classes are no longer accessible through it and are now available in the new org.apache.activemq.artemis.client module. This change might cause applications that use the internal module to encounter ClassNotFoundException errors. You must update your application configurations to use the new client module.
For more information, see Replace dependency on deprecated ActiveMQ Artemis module in the Migration Guide.
3.6. High availability Copy linkLink copied to clipboard!
3.6.1. Defining number of messages during scale down: Copy linkLink copied to clipboard!
The scale-down-commit-interval attribute is now added to the HA policy. Moving messages from one broker to another during scale-down involves an internal transaction per queue. This attribute defines the number of messages in that transaction so that the memory requirements for the transaction don’t exceed the limits of the available heap.
3.7. Server provisioning Copy linkLink copied to clipboard!
3.7.1. JBoss EAP Maven plug-in Copy linkLink copied to clipboard!
You can now use the JBoss EAP Maven plug-in to provision a JBoss EAP for bare metal. In previous releases you could only use the JBoss EAP Maven plug-in for OpenShift Container Platform. Additionally, you can package the provisioned server,as a bootable jar on baremetal.
For more information, see Provisioning JBoss EAP.
3.8. Development environments Copy linkLink copied to clipboard!
3.8.1. VSCode Copy linkLink copied to clipboard!
Starting in JBoss EAP 8.1 Beta, VSCode integration is fully supported.