back to all blogsSee all blog posts

With Jakarta Batch and XML Web Services features, all Jakarta EE 9 features now available in Open Liberty 21.0.0.2-beta

image of author
Austin Bailey on Jan 26, 2021

New in Open Liberty 21.0.0.2-beta are four Jakarta EE 9 packages, Jakarta Messaging 3.0, Jakarta Security 2.0, Jakarta Batch 2.0, and Jakarta XML Web Services 3.0, that join the collection of Jakarta EE 9 packages already available within Open Liberty. With these additions, all features needed to run Jakarta EE 9 applications are available in this Open Liberty beta release. Open Liberty 21.0.0.2-beta also includes previews for 7 of the updated MicroProfile features, including Config, Metrics, OpenTracing, Health, OpenAPI, Rest Client, and JWT.

We have two beta packages for Open Liberty:

  • Jakarta EE 9 Beta Features: a lightweight package that contains only the Jakarta EE 9 features.

  • All Beta Features: a larger package that contains all Open Liberty beta features (including Jakarta EE 9 beta features) and GA features and functions.

This means that you can now try out our in-development Open Liberty features by just adding the relevant coordinates to your build tools.

If you try either package, let us know what you think.

Jakarta EE 9 Beta Features package

The main change visible to developers in Jakarta EE is the names of packages changing to accomodate the new jakarta.* namespace. In this Open Liberty beta, we have a number of new API Release Candidates to join the expanding library of supported Jakarta packages.

This Open Liberty beta introduces the following Jakarta EE 9 features which now possess their all-new Jakarta EE 9 package names:

These join the Jakarta EE 9 features in previous Open Liberty betas:

  • Jakarta Mail (mail-2.0)

  • Jakarta WebSocket 2.0 (websocket-2.0; now with full CDI integration)

  • RESTful Web Services 3.0 (restfulWS-3.0 and restfulWSClient-3.0)

  • Jakarta Server Faces 3.0 (faces-3.0)

  • Jakarta Connectors 2.0 (connectors-2.0)

  • Jakarta Enterprise Beans 4.0 (enterpriseBeans-4.0)

  • Jakarta Enterprise Beans Remote 4.0 (enterpriseBeansRemote-4.0)

  • Jakarta Enterprise Beans Home 4.0 (enterpriseBeansHome-4.0)

  • Jakarta Enterprise Beans Lite 4.0 (enterpriseBeansLite-4.0)

  • Jakarta Enterprise Beans Persistent Timers 4.0 (enterpriseBeansPersistentTimer-4.0)

  • Jakarta EE Application Client 9.0 (jakartaeeClient-9.0)

  • Jakarta Authentication 2.0 (appAuthentication-2.0)

  • Jakarta Authorization 2.0 (appAuthorization-2.0)

  • Jakarta Persistence 3.0 (includes Eclipselink 3.0-GA.) (persistence-3.0)

  • Jakarta XML Binding 3.0 (xmlBinding-3.0)

  • Jakarta Managed Beans 2.0 (managedBeans-2.0)

  • Jakarta Concurrency 2.0 (concurrent-2.0)

  • Jakarta Bean Validation 3.0 (beanValidation-3.0)

  • Jakarta Contexts and Dependency Injection 3.0 (cdi-3.0)

  • Message-Driven Beans 4.0 (mdb-4.0)

  • JDBC 4.2 & 4.3 (jdbc-4.2 & jdbc-4.3)

  • Jakarta JSON Binding 2.0 (jsonb-2.0)

  • Jakarta JSON Processing 2.0 (jsonp-2.0)

  • Jakarta Servlet 5.0 (servlet-5.0)

  • Jakarta Server Pages 3.0 (pages-3.0)

  • Jakarta Expression Language 4.0 (expressionLanguage-4.0)

Jakarta Messaging 3.0

Jakarta Messaging is an API and services that enable applications to create, send, and receive messages via loosely coupled, reliable asynchronous communications. Support for version 3.0 updates the API and services to the jakarta.* namespace and introduces four new features for Jakarta EE 9: messaging-3.0, messagingClient-3.0, messagingServer-3.0, messagingSecurity-3.0.

Configuration is the same as the corresponding features for Jakarta EE 8 (jms-2.0, wasJmsClient-2.0, wasJmsServer-1.0, wasJmsSecurity-1.0) with one exception: version 3.0 support does not introduce a new feature corresponding to jmsMdb-1.0. Instead, use Jakarta EE 9 feature mdb-4.0 when deploying message-driven beans to connect to MQ providers, Jakarta Connectors resource adapters, or the embedded messaging server.

To enable the new Jakarta EE 9 messaging features, add them to your server.xml. Here’s a feature configuration that enables applications to access message queues via the Messaging 3.0 API, enables message-driven beans to connect to the embedded messaging server, and enables JNDI lookups for messaging resources.

The following features can be included in your server.xml:

 <featureManager>
       <feature>messagingClient-3.0</feature>
       <feature>mdb-4.0</feature>
       <feature>jndi-1.0</feature>
 </featureManager>

Jakarta Messaging 3.0 was originally included in the Open Liberty 21.0.0.1-beta, but missed publication.

Additional information about the Jakarta Messaging 3.0 specification can be found here.

Jakarta Security 2.0

The new appSecurity-4.0 feature has been created to support Jakarta EE 9 and introduces Jakarta Security 2.0 support. The appSecurityClient-1.0, audit-1.0, constrainedDelegation-1.0, jcaInboundSecurity-1.0, jwt-1.0, passwordUtilities-1.0 and spnego-1.0 features have been updated to also support Jakarta EE 9.

The appSecurity-4.0 feature must be added to server.xml when using application security with Jakarta EE 9. The other Liberty security features will automatically adapt to the level of Java EE or Jakarta EE that is already in use, so no change is needed when using them with Jakarta EE 9.

The following features can be included in your server.xml:

 <featureManager>
       <feature>appSecurity-4.0</feature>
       <feature>appSecurityClient-1.0</feature>
       <feature>audit-1.0</feature>
       <feature>constrainedDelegation-1.0</feature>
       <feature>jcaInboundSecurity-1.0</feature>
       <feature>jwt-1.0</feature>
       <feature>passwordUtilities-1.0</feature>
       <feature>spnego-1.0</feature>
 </featureManager>

Additional information about the Jakarta Security 2.0 specification can be found here.

Jakarta XML Web Services 3.0

Jakarta XML Web Services 3.0 is an API that enables applications to create SOAP based Web Services. The xmlWS-3.0 feature provides API updates to the Jakarta XML Web Services 3.0 API, Jakarta Web Services Metadata 3.0 API and Jakarta SOAP with Attachments 2.0 API. The jakartaeeClient-9.0 feature has been also been updated to provide Application Client Container support for the Jakarta XML Web Services 3.0 API.

The xmlWS-3.0 feature provides the Jakarta EE 9 XML Web Services 3.0 tools for Top Down and Bottom Up Web Services Creation: wsgen and wsimport. These can be found in a new location in the Open Liberty image: wlp/bin/xmlWS/. Both commands perform nearly identical to the Jakarta EE 8 tooling, with the exception that the -target argument is no longer required.

To enable the new Jakarta EE 9 XML Web Services 3.0 feature, add the xmlWS-3.0 feature to your server.xml. Here’s an example of what the feature configuration looks like:

 <featureManager>
       <feature>xmlWS-3.0</feature>
 </featureManager>

To run Jakarta XML Web Services on the Application Client Container: Here’s an example of what the client.xml configuration looks:

 <featureManager>
       <feature>jakartaeeClient-9.0</feature>
 </featureManager>

For more information see the Jakarta XML Web Services Specification.

Enable the Jakarta EE 9 beta features in your app’s server.xml. You can enable the individual features you want or you can just add the Jakarta EE 9 convenience feature to enable all of the Jakarta EE 9 beta features at once:

  <featureManager>
    <feature>jakartaee-9.0</feature>
  </featureManager>

Or you can add the Web Profile convenience feature to enable all of the Jakarta EE 9 Web Profile beta features at once:

  <featureManager>
    <feature>webProfile-9.0</feature>
  </featureManager>

Try it now

To try out these Jakarta EE 9 features on Open Liberty in a lightweight package, just update your build tools to pull the Open Liberty Jakarta EE 9 Beta Features package instead of the main release. The beta works with Java SE 15, Java SE 11, or Java SE 8.

If you’re using Maven, add the following runtimeArtifact section to the configuration section of your pom.xml file:

<runtimeArtifact>
    <groupId>io.openliberty.beta</groupId>
    <artifactId>openliberty-jakartaee9</artifactId>
    <version>21.0.0.2-beta</version>
    <type>zip</type>
</runtimeArtifact>

Or for Gradle:

dependencies {
    libertyRuntime group: 'io.openliberty.beta', name: 'openliberty-jakartaee9', version: '[21.0.0.2-beta,)'
}

Or take a look at our Downloads page.

All Beta Features package

The All Beta Features package includes the following beta features (in addition to all Jakarta EE 9 beta features):

Currently, due to an issue in MicroProfile Fault Tolerance 3.0, neither the mpFaultTolerance-3.0 feature nor the microProfile-4.0 convenience feature can be used in the Open Liberty 21.0.0.2-beta. All other MicroProfile 4.0 features can still be individually installed.

Try it now

To try out these features, just update your build tools to pull the Open Liberty All Beta Features package instead of the main release. The beta works with Java SE 15, Java SE 11, or Java SE 8.

If you’re using Maven, add the following runtimeArtifact section to the configuration section of your pom.xml file:

<runtimeArtifact>
    <groupId>io.openliberty.beta</groupId>
    <artifactId>openliberty-runtime</artifactId>
    <version>21.0.0.2-beta</version>
    <type>zip</type>
</runtimeArtifact>

Or for Gradle:

dependencies {
    libertyRuntime group: 'io.openliberty.beta', name: 'openliberty-runtime', version: '[21.0.0.2-beta,)'
}

Or take a look at our Downloads page.

Your feedback is welcomed

Let us know what you think on our mailing list. If you hit a problem, post a question on StackOverflow. If you hit a bug, please raise an issue.

Tags