In the June Release of Payara Platform: MicroProfile 3.3 Compatibility

Payara

With the June Payara Platform releases, Payara Platform will support version 3.3 of the MicroProfile (MP) standard. This blog summarises what changed since 3.2 and how this affects the Payara Platform.

Since MicroProfile 3.2 the standard received updates for 5 projects:

New and Noteworthy in MP Config 1.4

In version 1.4, details of configuration value conversion were updated. The build-in conversion now supports the primitives byte, short and char and their wrapper classes Byte, Short and Character

The so called automatic converter created from potentially existing static factory methods of(String), valueOf(String) or parse(CharSequence) or the constructor T(String) of a target class changed in priority to of (highest), valueOf, parse, constructor (lowest). The existing method or constructor with highest priority is used to create target class from a property value String.

Furthermore the Converter abstraction now extends Serializable.

In addition to the standard, Payara Platform introduced a short time caching of property values to improve lookup performance of frequently queried properties. The default Time To Live (TTL) for this cache is 1 minute. This can be changed by setting the system property MP_CONFIG_CACHE_DURATION to the number of seconds a value should be cached. Using zero or less disables the cache.

New and Noteworthy in MP FaultTolterance 2.1

The @Fallback annotation got the new attributes applyOn (white-list) and skipOn (blacklist) of exception classes that should or should not trigger the fallback method usage. The Blacklist has priority over the white-list. Whether or not a thrown exception is a member of a set is checked by class assignability. If a thrown exception is not a member of any of the two sets it is re-thrown, no fallback is called.

Similarly the @CircuitBreaker annotation got a skipOn (blacklist) in addition to its existing failOn (whitelist) attribute. These work in an identical way to determine which exceptions affect the circuit breaker state.

For @Asynchronous execution the CDI @RequestScope context is now activated for that worker thread responsible to run the asynchronous computation.

Methods that were annotated with both @Bulkhead and @Asynchronous now semantically exit the bulkhead when control transfers back to the caller as opposed to when the underlying annotated method returns a value. This means queuing computations can first enter the bulkhead after all fault tolerance semantics have been applied fully.

Furthermore issues discovered in Payara Platform since FT 2.0 have been addressed. The exception handling now correctly handles Error subtypes. A race condition during deployment that could lead to miscounting the number of threads entering and exiting a bulkhead was addressed and FT configurations referencing application specific classes no longer fail to load these from their string name.

New and Noteworthy in MP Health 2.2

The MP Health 2.2 release is updates to CDI version 2.0. 

New and Noteworthy in MP Metrics 2.3

In Metrics 2.3, a new metric type SimpleTimer was introduced. It is similar to Timer but does not provide the Metered statistics which saves the overhead in cases the statistics are of no interest. As usual it can be used programmatically or by using the new corresponding @SimplyTimed annotation.

We also addressed an issue in the OpenMetrics export format that would wrongly duplicate TYPE lines for metrics of the same name but different tags.

As global tags feature of metrics uses MP Config lookups frequently the implementation will also benefit substantially from the caching introduced.

New and Noteworthy in MP RestClient 1.4

Version 1.4 clarified that the support for injection of JAX-RS @Context fields or methods into ClientHeadersFactory implementations is optional. Payara Platform current only supports CDI injection using @Inject.

Furthermore the @RestClient annotation got annotated with @Target allowing the typical set for CDI qualifiers: ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER and ElementType.TYPE (version 1.4.1).

Conclusion

MicroProfile 3.3 further completes the picture with some new details and smaller feature additions. Nonetheless this is an important step for Payara with key improvements being done under the hood. 

{{cta(’77fcdb65-ef13-465d-9e31-cabe74480ece’)}}

 

Comments (0)

Post a comment

Your email address will not be published. Required fields are marked *

Payara needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Legal & Privacy Policy.

Related Posts

payara qube logo 5 minutes
Payara

Payara Cloud Is Now part of Payara Qube family of Unified Platforms for Enterprise Java

Payara Cloud is becoming part of Payara Qube family of Java application deployment runtimes. This move reflects how the […]

Payara promotional graphic showing transition from Spring to Jakarta EE, including technology logos, a code icon and arrows leading from Spring to Jakarta EE. 6 minutes
Jakarta EE

From Spring Boot To Jakarta EE 11: How Payara Starter Eases The Transition

If you’ve been living in the Spring ecosystem, you’re used to fast project setup. Spring Initializr gives you a […]

Promotional graphic for a podcast episode titled “Why Open Source is the Future of Business Innovation - A conversation with Arun Gupta”. The podcast is hosted by Payara Community. The right side features a photo of the speaker, Arun Gupta, labeled as a “VP, Developer Experience at JetBrains”. The design uses dark blue and teal backgrounds with coral and fish illustrations. 2 minutes
Community

Payara Podcast – Why Open Source is the Future of Business Innovation – A Conversation with Arun Gupta

Open source is no longer a developer-only concern — it’s at the heart of how modern businesses innovate, build […]