Skip to main content

Hashtag Jakarta EE #90

by Ivar Grimstad at September 19, 2021 09:59 AM

Welcome to the ninetieth issue of Hashtag Jakarta EE!

JDK 17 was released this week. With it, Oracle announced a new site for Java developers called dev.java. Check it out and let them know what you think! Oracle also announced plans for shifting the LTS release cadence from three to two years. This means that the next LTS release from Oracle will be JDK 21. Other vendors may have different approaches, but I don’t think it is a very controversial guess that most will follow suit.

The 2021 Jakarta EE Developer Survey report came out this week as well. If you are subscribing to the Jakarta EE Community mailing list, check your inbox for your copy of the report. Otherwise, use this link to get the report. You may also want to check out Top Trends in the Jakarta EE Developer Survey Results by Mike Milinkovich.

In Hashtag Jakarta EE #88, I mentioned the announcement that Spring 6.0 will be based on Jakarta EE 9. Well, here’s proof that it is on its way. Take a look at this Jakarta EE 9 Migration commit to get a feeling of the implications of the switch from javax.* to jakarta.* namespaces. Thanks to Christian Kaltepoth for pointing me in this direction.

The takeaway is that if a massive framework like Spring can do this, so can you! So don’t let fear of the namespace switch stop you from migrating to newer Jakarta EE releases.


by Ivar Grimstad at September 19, 2021 09:59 AM

[DEUTSCH] JAX-RS 3.1 – Prequel zum Java-Forum-Stuttgart 2021 | Head Crashing Informatics 35 | Teaser

by Markus Karg at September 18, 2021 03:00 PM

Es ist schon fast Tradition, dass ich (wie Ihr wisst, JAX-RS-Committer und Spec-Co-Autor) auf dem Java-Forum-Stuttgart die jeweils neuesten Features der aktuellen oder kommenden Version von #JAX-RS alias #JakartaREST beleuchte. Auch dieses Jahr bin ich wieder dabei: https://www.java-forum-stuttgart.de/vortraege/jakarta-rest-3-1-live-und-in-farbe-neue-features-direkt-vom-erzeuger/. Leider darf der vorproduzierte Vortrag nur 40 Minuten dauern, daher musste ich an der einen oder anderen Stelle etwas kürzen — unter anderem beim entfallenen Rückblick auf die Versionen JAX-RS 2.1.x und 3.0, welches Ihr hier in VOLLER Länge (ungeschnitten und ungeschminkt), quasi als “Teaser” zum Aufwärmen vor der Konferenz, sehen könnt.

Begeistert Euch dieses Konferenz-Vorwort? Dann holt Euch schnell ein Online-Ticket für die virtuelle Konferenz, und lasst Euch dort von mir am 23.09. die wichtigsten Features von JAX-RS 3.1 erklären – es winken Background-Infos und eine anschließende Q&A per Videokonferenz! JAX-RS Committer Statistik: https://github.com/eclipse-ee4j/jaxrs-api/graphs/contributors

Wenn Dir dieses Video gefällt, dann gib ihm bitte einen Daumen hoch, empfehle es weiter, abonniere meinen Kanal, oder werden mein Unterstützer https://www.patreon.com/mkarg. Danke! 🙂

Stay safe and… Party On!


by Markus Karg at September 18, 2021 03:00 PM

The Ingredients of GraalVM--an airhacks.fm podcast

by admin at September 18, 2021 06:39 AM

Subscribe to airhacks.fm podcast via: spotify| iTunes| RSS

The #157 airhacks.fm episode with Oleg Selajev (@shelajev) about:
the relation between openJDK and GraalVM, GraalVM's compatibility with "stock" Java, GraalVMs performance optimisations, polyglot GraalVM, debugging and profiling and "Java on Java on Java"
is available for download.

by admin at September 18, 2021 06:39 AM

The (hopefully) Shortest Java 17 Quickstarter

by admin at September 15, 2021 09:52 AM

To create a Java 17 / Apache Maven project:
  • git clone https://github.com/AdamBien/java17-plain
  • cd java17-plain
  • mvn package
  • [mvn test]

The project is available at: https://github.com/AdamBien/java17-plain


by admin at September 15, 2021 09:52 AM

OpenJDK Contribution Accepted! | The Two Minutes Tuesday 032 | Java Insider Report

by Markus Karg at September 14, 2021 09:00 PM

This week my very first contribution to #OpenJDK was finally accepted and merged into the mainstream branch. Hence with #Java 18 you will gain 2…5x faster performance definitively!

If you like this video, please give it a thumbs up, share it, subscribe to my channel, or become my patreon https://www.patreon.com/mkarg. Thanks! 🙂

CU!


by Markus Karg at September 14, 2021 09:00 PM

#156 Bash, Apple and EJB, TomEE, Geronimo and Jakarta EE

by David Blevins at September 14, 2021 02:07 PM

New podcast episode with @dblevins.  Apple and EJB, @ApacheTomEE, @tomitribe, @JakartaEE, the benefits of code generation with bash, and over-engineering”–the 156th http://airhacks.fm

The post #156 Bash, Apple and EJB, TomEE, Geronimo and Jakarta EE appeared first on Tomitribe.


by David Blevins at September 14, 2021 02:07 PM

How to use QueryDSL with Hibernate

by Thorben Janssen at September 14, 2021 12:00 PM

The post How to use QueryDSL with Hibernate appeared first on Thorben Janssen.

QueryDSL is a popular framework that provides you a Java API to create queries for relational databases and other data stores. If you’re familiar with JPA’s Criteria API, you might think that it does the same as QueryDSL and that you don’t need to learn about another framework. But I recommend you give QueryDSL a […]

The post How to use QueryDSL with Hibernate appeared first on Thorben Janssen.


by Thorben Janssen at September 14, 2021 12:00 PM

Top Trends in the Jakarta EE Developer Survey Results

by Mike Milinkovich at September 14, 2021 11:00 AM

Our annual Jakarta EE Developer Survey results gives everyone in the Java ecosystem insight into how the cloud native world for enterprise Java is unfolding and what the latest developments mean for their strategies and businesses. Here’s a brief look at the top technology trends revealed in this year’s survey.

For context, this year’s survey was completed by almost 950 software developers, architects, and decision-makers around the world. I’d like to sincerely thank everyone who took the time to complete the survey, particularly our survey partners, Jakarta EE Working Group members Fujitsu, IBM, Jelastic, Oracle, Payara, Red Hat, and Tomitribe, who shared the survey with their communities. Your support is crucial to help ensure the survey results reflect the viewpoints of the broadest possible Java developer audience.

Jakarta EE Continues to Deliver on Its Promise

Multiple data points from this year’s survey confirm that Jakarta EE is fulfilling its promise to accelerate business application development for the cloud.

As in the 2020 survey results, Jakarta EE emerged as the second-place cloud native framework with 47 percent of respondents saying they use the technologies. That’s an increase of 12 percent over the 2020 survey results, reflecting the industry’s increasing recognition that Jakarta EE delivers important strategic and technical benefits.

Almost half of the survey respondents have either already migrated to Jakarta EE or plan to within the next six to 24 months. Together, Java EE 8, Jakarta EE 8, and Jakarta EE 9 are now used by 75 percent of survey respondents. And Jakarta EE 9 usage reached nine percent despite the fact the software was only released in December 2020.

With the rise of Jakarta EE, it’s not surprising that developers are also looking for faster support from Java EE/Jakarta EE and cloud vendors.

Microservices Usage Continues to Increase

Interestingly, the survey revealed that monolithic approaches are declining in favor of hybrid architectures. Only 18 percent of respondents said they’re maintaining a monolithic approach, compared to 29 percent who have adopted a hybrid approach and 43 percent who are using microservices.

A little over a year ago, monolithic implementations were outpacing hybrid approaches, showing just how quickly the cloud native Java world is evolving. In alignment with these architectural trends, MicroProfile adoption is up five percent over last year to 34 percent.

Download the Complete Survey Results

For additional insight and access to all of the data collected in our 2021 Jakarta EE Developer survey, we invite everyone to download the survey results.


by Mike Milinkovich at September 14, 2021 11:00 AM

Read All About It: Interviews With Our CEO Steve Millidge

by Priya Khaira-Hanks at September 13, 2021 09:47 AM

Did you know? Payara Services is the proud recipient of a 2021 Queen's Award for Enterprise - International Trade. Often called the "Knighthood for Business", theQueen's Award is the UK's premier business accolade. 

On the back of this achievement, our CEO and Founder Steve Millidge was in high demand as an interviewee. In two recent interviews, you can find out more about what winning this award meant, Payara as a business, more about our open source business model and even Steve's motto! 


by Priya Khaira-Hanks at September 13, 2021 09:47 AM

Hashtag Jakarta EE #89

by Ivar Grimstad at September 12, 2021 09:59 AM

Welcome to the eighty-ninth issue of Hashtag Jakarta EE!

We are approaching the last quarter of 2021 (can you believe it?), which in turn means that the first quarter of 2022 is also imminent. Why am I bringing this up? Well, here’s the deal. Jakarta EE 10 is scheduled for Q1, 2022, and to be able to deliver according to the release plan, all the individual specifications that are part of Jakarta EE 10 need to start their release process earlier.

The following dates have been communicated by the Jakarta EE Platform Project:

Target date: October 15, 2021
Last call: December 15, 2021

Some of the specification projects have started releasing/staging milestone releases. For example, the 5.0.0-M1 API for Jakarta Expression Language is available in the Jakarta Staging Repository. You can also find the 4.0.0-M1 of Jakarta Faces there. Currently released embedded with Eclipse Mojarra, hence the org.glassfish Group ID, but will soon be released separately when the work progresses.

Add the following repository definition to try out the staged artifacts:

    <repository>
        <id>jakarta-nexus-staging</id>
        <name>Jakarta Staging</name>
        <url>https://jakarta.oss.sonatype.org/content/repositories/staging/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>

Jakarta EE Elections

The elections for seats in the Jakarta EE committees have been initiated. Read about the details in Jakarta EE Elections. If you are in the process of writing up your nomination or already have nominated yourself, please reach out to me if you would like to create an accompanying promotion video. We will set up a short Studio Jakarta EE interview where you can tell the community why they should vote for you.

If you need inspiration for why you should contribute to Open Source in general, or Jakarta EE in particular, check out this great article and interview with Kevin Sutter.


by Ivar Grimstad at September 12, 2021 09:59 AM

Simplicity By Design, SSO, Constraints, Productivity, Microservices, Databases, Streaming Architectures, Vanilla JS--or 90th airhacks.tv

by admin at September 10, 2021 02:01 PM

The 90th airhacks.tv, live streamed from https://youtube.com/c/bienadam/), with the following topics:
Simplicity By Design, SSO and Windows, Constraints vs. Productivity, Microservices and Databases, Streaming Architectures, Vanilla JS, SSO, Scopes, Hibernate, ARM, Loom, Helidon, Kubernetes and Payara Cloud

...is available:

See you every first Monday of the month at https://airhacks.tv 8pm CET (UTC+1:00). Show is also announced at: meetup.com/airhacks.

Any questions left? Ask now: https://gist.github.com/AdamBien/93095b0cdc71892d2bbf562e2856c30d and get the answers at the next airhacks.tv.

by admin at September 10, 2021 02:01 PM

Meet our open-source champions: Kevin Sutter, JakartaEE Advocate

September 10, 2021 12:00 AM

In this blog series, we’re highlighting some of the amazing individuals who contribute to Open Source software (OSS). We’ll delve into their contributions within OSS, their career journey, how OSS involvement has helped them, and their advice to others for getting involved.

Introduction:

Kevin is co-lead of both the Jakarta EE ™ Platform project and the MicroProfile ™ project at the Eclipse Foundation. His involvement with these projects started during the initial investigative phases and continues with all aspects of code and specification development – project committer, PMC member, Steering Committee member, and Specification Committee member.

Kevin’s day job is leading the architecture of Enterprise Java for the WebSphere product family at IBM. Outside of work, he enjoys the outdoors (camping, biking, hiking, skiing) and working on family construction projects.

Kevin at the DevNexus conference booth

Tech introduction:

Jakarta EE is the reincarnation of Java EE ™ in the open source world. Jakarta EE operates under an open governance model at the Eclipse Foundation. Many more organizations and individuals now contribute to the future of Java in the Enterprise via the Jakarta EE Working Group and associated Specification Projects.

MicroProfile was created to innovate Enterprise Java in a microservices environment. At the time, Java EE was stagnant and had not started its journey as Jakarta EE. A few key organizations collaborated to create MicroProfile at the Eclipse Foundation and it has continued to grow, establishing a working group earlier this year.

Due to my involvement with these two key working groups at the Foundation, I was elected as a Committer Representative to the Eclipse Foundation Board of Directors early in 2021. This participation has allowed me to meet with and participate with other leaders across the open-source industry.

Q&A:

What encouraged you to get started with open source projects? How does working on an open-source community project like this compare to working on a proprietary project?

An IBM assignment was my first introduction to open source. Back in 2006, I was asked to lead the JPA (Java Persistence API) effort for WebSphere. This assignment required me to participate on the OpenJPA project at Apache. This was my first exposure to the open source environment. And, to be honest, I have never looked back. My "team" was no longer just IBMers. It consisted of extremely talented individuals from other companies and organizations. At first, I was nervous about "meeting the bar", but, I quickly learned that not any one person knows everything and that everyone makes mistakes. The open source community is there to help you grow in your career.

Group photo of IBMers at EclipseCon

I find open-source development very enjoyable and very educational. Everyday I am working with top-notch talent across the industry. This not only keeps me on my toes, but it’s also so good to learn from this set of talented individuals.

Schedules are also a little more flexible in the open-source environment. We still set goals and deadlines. However, since this is an open-source effort, we are dependent on the time and resources available from any given organization. We still find ourselves working long hours at times, but it’s more because of our desire and commitment to completing the task rather than because an executive needs something for a customer presentation by Monday morning.

How has your experience working on open-source project affected or influenced your work at IBM?

I have learned how important the community is. When I am working with so many unique individuals and organizations across the spectrum for completing some task, you need to rely on a much bigger and varied community. Community members start to work with and educate other community members and, pretty soon, you start to get contributions from people you have never heard of before. The community just continues to grow and thrive.

How has your role changed since getting involved in open-source? What impact have you been able to have within IBM through your role/involvement?

Recently, because of my shift to a part-time FWLOA (Flexible Work Leave of Absence) schedule, my focus for my three days of work is on our open-source activities at the Eclipse Foundation. I have allocated my WebSphere product development responsibilities to other individuals. Being able to focus on open-source almost exclusively has really been beneficial to the success of my part-time schedule.

Previous to being elected as a Committer Rep on the Eclipse Foundation Board, I was the backup participant for Pradeep Balachandran (IBM’s rep on the Board). My involvement with both the Jakarta EE and MicroProfile efforts were key factors in being selected for this role. And, now being an actual member of the Board, I participate and vote on the Board’s decisions to help shape the future of the Eclipse Foundation. To me that is pretty cool!

JakartaEE Interview with Kevin

Why is JakartaEE an important open source project? What does it offer? How did this project come about? How did it evolve from EE4J?

Java EE had an amazingly large customer base across the globe. Of course, WebSphere supported this programming model. But, so did several other companies — with either products or services in support of Java EE. Now that Java EE has completely migrated to Jakarta EE at Eclipse, we have even a larger responsibility to grow and cultivate this important programming model.

One of the big changes that was first introduced was the changing from the "javax" namespace to the "jakarta" namespace. Although this was a challenge for everyone involved, it was a necessary step to completely break away from the old "ball-and-chain" of Java EE processes and regulations. We are now able to introduce new innovative features (and possibly remove some "dead weight") to the Jakarta EE programming model. The plans for Jakarta EE 10 are really shaping up to demonstrate this new frontier.

As far as the relationship between EE4J and Jakarta EE…​ When Java EE was first contributed to the Eclipse Foundation, we needed a project name to use in our conversations to differentiate it from Java EE. We knew that project names with the "for Java" suffix were okay to use, so we just reversed the order of the Java EE name and came up with "EE for Java", which is abbreviated EE4J. The EE4J name is still used in some of our artifacts such as our github repository — https://github.com/eclipse-ee4j.

What is it like to create a specification for an open-source project like this? How does it differ from working on code?

Specifications can be tricky. We use the English language to describe the programming model capabilities. And, the language has to be very specific (must, should, may, …​) to get the proper semantic meaning. But, code still plays a part in the Specification process. We need to codify the Specifications with the associated APIs. We also need to develop a set of Technology Compatibility Kit (TCK) tests, which are used to verify any potential Compatible Implementations. The combination of the Specification, API, TCK, and Compatible Implementation is key to the success of the Specification.

How did you become a project lead for JakartaEE? What is involved with being a project lead for an open source project like this?

A project lead for a Specification project is really not all that special. We have no more control or influence on the Specification content than any other committer or contributor to the project. To be clear, a Specification project lead is not a Specification lead, like in the old days with Java EE. A Specification project lead helps ensure that the open-source specification process is properly interpreted and followed. Each component Specification project lead also maintains communication with the Platform project to ensure that we have cohesive platform.

As a fan of enterprise Java and its related open source projects, why would you recommend this language for those seeking to build cloud-native enterprise applications?

Enterprise Java has a long history and it continues to evolve as our customers' needs evolve. Java is still near the top of programming languages in use today. And, with the introduction of MicroProfile and other new innovations in Jakarta EE, this whole environment continues to thrive. I have no hesitancy recommending the whole Java ecosystem for microservice and enterprise development efforts.

Kevin presenting

What tips would you give for someone who is interested in getting involved in open source? Any specific tips for the JakartaEE or MicroProfile communities?

Just start! Pick an area you have an interest in, whether it’s a specific technology like Servlet or MVC, or a specific skill like documentation or testing. There are so many different ways to contribute. All of the projects have mailing lists and/or GitHub repositories. Start exploring. Find some Issue that interests you and try contributing. Case in point: most of the images in our platform specification are in png format. These are extremely hard to maintain. A new contributor noticed that we were looking for svg format replacements for these images and they started to contribute replacement images. This person had an interest and skill that filled a void in our Platform team.

Now a fun question — What activities do you enjoy outside of work?

Just about anything that is "real" and not "abstract" like what we do at work everyday. I enjoy carpentry work. Recently, I helped with re-modeling the basement of my daughter’s home. This included everything from drawing up plans, getting permits, doing the plumbing, and doing the electrical. The drywall is up, so all that is left is the finish work. With their home being built in 1920, there are always projects to keep me busy.

My wife and I enjoy many activities together including camping, biking, and hiking. We are also avid (American) football fans. I’ve been a Vikings fan all my life and my wife is a diehard Packers fan, but we still get along — even after the game where the Vikings defense broke the Packers quarterback’s collarbone and ended his season (2017).

Kevin and his wife at a football game

Another activity I am very involved with is the VITA (Volunteer Income Tax Assistance) tax program. This program helps low-income and elderly people in our area with completing their tax returns each year. I have learned so much about our community while assisting with this activity. And, I’ve learned much more about our tax laws than I really ever cared to…​ :-)

Thank you for the opportunity to share my thoughts about open-source development.

Getting started with Open Source

If this article has helped inspire you to get started contributing to open source, why not consider contributing to Open Liberty. It’s easy to get started: https://openliberty.io/contribute/


September 10, 2021 12:00 AM

Bash, Apple and EJB, TomEE, Geronimo and Jakarta EE--an airhacks.fm podcast

by admin at September 09, 2021 07:29 AM

Subscribe to airhacks.fm podcast via: spotify| iTunes| RSS

The #156 airhacks.fm episode with David Blevins (@dblevins) about:
Java code generation with bash, Apple's desire for EJB, Apache TomEE, over engineered Apache Geronimo, Java EE and Jakarta EE
is available for download.

by admin at September 09, 2021 07:29 AM

Jakarta EE Elections

by Ivar Grimstad at September 09, 2021 06:40 AM

The elections to fill the elected seats in the Jakarta EE Committees are starting! The important dates are as follows:

Nomination period: September 8, 2021 – September 16, 2021
Election Period: September 21, 2021 – September 28, 2021
Results announced: September 30, 2021

You can read more about the committees below to figure out whether you would want to candidate for any of them. If you do, send your nomination to the Jakarta EE Working Group mailing list indicating which committee you are interested in participating in, and which member group you want to represent. NOTE that you need to be a Participant Member to represent the Participant Members, and a Committer Member to represent the Committer Members.

For Participant Members, this is pretty straightforward since you probably know what level of membership your organization has joined the Jakarta EE Working Group.

For Committers, it is a little more confusing. Even if you are a committer on a Jakarta EE project, you are not necessarily a Committer Member of the Jakarta EE Working Group. There is absolutely no cost associated with it, just a little more paperwork to be sorted out. If you are unsure of your membership status, please contact the Eclipse Foundation to get help figuring it out.

Jakarta EE Steering Committee

This committee owns the overall strategy and the high-level, long-term roadmap spanning multiple releases, produces the Jakarta EE release key messaging, and gets periodic updates from other committees and the Jakarta EE Platform Project on the status of the release and any related activities.

Committer Member Representative – one seat
Participant Member Representative – one seat

Read more about the Jakarta EE Steering Committee.

Jakarta EE Specification Committee

The Specification Committee is responsible for implementing the ​Jakarta EE Specification Process (JESP) ​for all Specification Projects under the purview of the Jakarta EE Working Group. This committee ensures that JESP is followed as intended, votes to approve creation reviews, progress reviews and release reviews submitted by Specification projects.

Committer Member Representative – one seat
Participant Member Representative – one seat

Read more about the Jakarta EE Specification Committee.

Jakarta EE Marketing Committee

The focus of this committee is on marketing, branding and community awareness and produces and executes the marketing plan for the release based on the Jakarta EE Key messaging provided by the Steering Committee.

Committer Member Representative – one seat
Participant Member Representative – one seat

Read more about the Jakarta EE Marketing Committee.


by Ivar Grimstad at September 09, 2021 06:40 AM

From String to JsonObject and Back with Jakarta JSON Processing (JSON-P)

by admin at September 08, 2021 06:00 AM

To read a Java String with Jakarta JSON Processing (JSON-P) into a jakarta.json.JsonObject, add the following dependency to your pom (or e.g. Joy):

<dependency>
    <groupId>org.glassfish</groupId>
    <artifactId>jakarta.json</artifactId>
    <version>2.0.1</version>
</dependency>

Now a JsonObject can be read from a String:

import java.io.StringReader;
import java.io.StringWriter;

import jakarta.json.Json;


var message = """            
    {"hello":"world"}
""";

var jsonReader = Json.createReader(new StringReader(message));
var messageAsJson = jsonReader.readObject();
assertEquals("world", messageAsJson.getString("hello"));

...and written back to its String representation:


var stringWriter = new StringWriter();
var jsonWriter = Json.createWriter(stringWriter);
jsonWriter.writeObject(messageAsJson);

var readMessage = stringWriter.toString();
assertEquals(message.trim(), readMessage);

Also checkout: Jakarta JSON Processing with Japanese Joy


by admin at September 08, 2021 06:00 AM

Spring Data JPA – Working with Views

by Thorben Janssen at September 07, 2021 12:00 PM

The post Spring Data JPA – Working with Views appeared first on Thorben Janssen.

Database administrators often use views to combine, transform and present data in a form that’s easy to process and query by the application. They are easier to maintain and optimize than a complex query statement that’s developed and maintained in one or more applications. Using Spring Data JPA, you can map and query views in […]

The post Spring Data JPA – Working with Views appeared first on Thorben Janssen.


by Thorben Janssen at September 07, 2021 12:00 PM

'Serverless Kubernetes without YAML' - Adam Bien's interview with Patrik Duditš

by Jadon Ortlepp (Jadon.Ortlepp@Payara.fish) at September 07, 2021 09:51 AM

In a recent episode of the Airhacks podcast, host Adam Bien interviewed Payaran Patrik Duditš who is in charge of our Payara Cloud project.


by Jadon Ortlepp (Jadon.Ortlepp@Payara.fish) at September 07, 2021 09:51 AM

Java 17 early access support, JWE support for access and ID tokens, MicroProfile Context Propagation 1.3, and more in Open Liberty 21.0.0.10-beta

September 07, 2021 12:00 AM

Open Liberty 21.0.0.10-beta provides long-awaited Java 17 early access support, offering a lot of new enhancements and functionality. Also included is JWE token format support for OpenID Connect Client (OIDC) and Social Media Login. This beta also offers updates to MicroProfile Context Propagation, meaning that you can now use MicroProfile Context Propagation within your Jakarta EE 9 applications, as well as Jakarta EE 9 support for the remaining Open Liberty value-add features.

We have two beta packages for Open Liberty:

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

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

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.

All Beta Features package

The All Beta Features package includes the following beta features:

Java 17 early access support

The long awaited release of Java 17 is coming soon and it will be the first LTS (long term support) release since Java 11. It will offer a lot of new functionality and environmental changes that you will want to check into. Because it will be a milestone release, we thought you might like to take a test drive with the early access release of Java 17 (we have been testing with build 35). This will allow you to test out your existing applications and microservices or write a new one on your favorite server runtime, Open Liberty!

Some of the noteworthy highlights from Java 12-17:

By taking advantage of trying out the new changes in Java 17 now, you get more time to review your applications, microservices and runtime environments and be a step ahead when it becomes generally available.

To give this a try today, download the early access release of Java 17, download and install the 21.0.0.10-beta version of Open Liberty, edit your Liberty server’s server.env file to point JAVA_HOME to your Java 17 installation and start testing!

For more information on Java 17, please visit the Java 17 release notes page, API Javadoc page or download page. For more information on Open Liberty, please visit our documentation page.

*Note: As we work towards full Java 17 support ourselves, please excuse any of our functionality that might not be 100% ready yet. If you do hit any issues, let us know by providing feedback.

JWE support for OpenID Connect Client and Social Media Login

With this beta, the OpenID Connect Client 1.0 and Social Media Login 1.0 features support receiving tokens in the JSON Web Encryption (JWE) format. A JWE is a way to represent encrypted content using JSON. In addition to supporting JWE, the OpenID Connect Client 1.0 feature provides an option to temporarily cache access token validation results for inbound propagation. Both features add support for the RS384, RS512, HS384, HS512, ES256, ES384, and ES512 signature algorithms.

Prior to this beta, the OpenID Connect Client 1.0 and Social Media Login 1.0 features did not support consuming access or ID tokens in JWE format. This limited our interoperability with other OIDC clients and providers that use JWEs to propagate access tokens or provide identifying information about the authenticated user. With this beta, the OpenID Connect Client 1.0 and Social Media Login 1.0 features will be able to interoperate with OpenID Connect Providers that provide JWE formatted access and ID tokens.

You can configure a Liberty OpenID Connect Relying Party to process access and ID tokens that are in a JWE format. The corresponding OpenID Connect Provider should support creating JWE access or ID tokens.

  • Set the OpenID Connect Provider with the OpenID Connect Relying Party’s public key that is used to encrypt the Content Encryption Key according to the OpenID Connect Provider’s documentation.

  • Set the keyManagementKeyAlias attribute to the private key alias of the key management key that is used to decrypt the Content Encryption Key of JWE token. The key must exist in the keyStore configured for the SSL configuration referred by the the sslRef attribute. For example, <openidConnectClient keyManagementKeyAlias="privateKeyAlias" />

Optional: Configure access token cache.

You can configure a Liberty OpenID Connect Relying Party to cache access token validation results for inbound propagation.

  • Set the accessTokenCacheEnabled attribute to true.

  • Set the accessTokenCacheTimeout attribute to a duration specifying how long an authenticated subject that is created by using a propagated access token is cached.

  • Set the tokenReuse attribute to true if the OpenID Connect Relying Party must cache results for a JWT access token that includes a jti claim. Although enabling this support may result in a performance improvement, it is recommended that the value for the accessTokenCacheTimeout attribute is short to reduce the possibility of a stale result as compared to what a validation call to the OpenID Connect Provider would have produced.

You can also configure Liberty OIDC Social Login to process ID tokens that are in a JWE format. The corresponding OpenID Connect Provider should support creating JWE ID tokens.

  • Set the OpenID Connect Provider with the OIDC Social Login’s public key that is used to encrypt the Content Encryption Key according to the OpenID Connect Provider’s documentation.

  • Set the keyManagementKeyAlias attribute to the private key alias of the key management key that is used to decrypt the Content Encryption Key of JWE token. The key must exist in the keyStore configured for the SSL configuration referred by the the sslRef attribute. For example, <oidcLogin keyManagementKeyAlias="privateKeyAlias" />

The signatureAlgorithm attributes of both elements now support the RS384, RS512, HS384, HS512, ES256, ES384, and ES512 signature algorithms.

<openidConnectClient signatureAlgorithm="RS384"/> <oidcLogin signatureAlgorithm="RS384"/>

For more information about OpenID Connect Client refer to the OpenID Connect Client specification.

MicroProfile Context Propagation 1.3

MicroProfile Context Propagation 1.3 Release Candidate 1 adds support for Jakarta EE 9 packages (jakarta.*) and eventual alignment with the MicroProfile 5.0 platform. With the 1.3 RC1 release, you can now use MicroProfile Context Propagation within your Jakarta EE 9 applications.

To enable the new beta features in your app, add them to your server.xml:

<server>
  <featureManager>
    <feature>cdi-3.0</feature>
    <feature>jndi-1.0</feature>
    <feature>mpContextPropagation-1.3</feature>
    <feature>servlet-5.0</feature>
  </featureManager>
</server>

If you’re using Maven, here are the coordinates:

<dependency>
    <groupId>org.eclipse.microprofile.context-propagation</groupId>
    <artifactId>microprofile-context-propagation-api</artifactId>
    <version>1.3-RC1</version>
</dependency>

For more information on this MicroProfile Context Propagation update, refer to the JavaDoc and specification.

Jakarta EE 9 support for the remaining Open Liberty value-add features

In January of this year we published the Open Liberty 21.0.0.2-beta release blog post which announced Open Liberty becoming the first vendor product to be Jakarta EE Web Profile 9.0 compatible, and since then we’ve continued to deliver more Jakarta EE 9 support. This included 9.0 Full Platform support, 9.1 Web Profile and Full Platform support, and incremental support of Jakarta 9 for the Open Liberty value-add features. With the 21.0.0.10-beta release, we are proud to announce that we have now completed our journey by adding Jakarta EE 9 support for the remaining value-add features! The value-add features with Jakarta EE9 support that are added in this beta release are as follows:

Existing server configurations that use these value-add features will now work with Jakarta EE 9 features when migrating applications in those server configuration to use Jakarta EE9 technologies.

Next on the horizon is MicroProfile 5.0, which will bring Jakarta EE 9 support to the various MicroProfile features.

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, here are the coordinates:

<dependency>
  <groupId>io.openliberty.beta</groupId>
  <artifactId>openliberty-runtime</artifactId>
  <version>20.0.0.10-beta</version>
  <type>pom</type>
</dependency>

Or for Gradle:

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

Or take a look at our Downloads page.

Jakarta EE 9 Beta Features package

Open Liberty is the first vendor product to be Jakarta EE Web Profile 9.0 compatible since the 21.0.0.2-beta release. Open Liberty is also the first vendor product to be added to the Jakarta EE Platform 9.0 compatability list, with the release of 21.0.0.3-beta. Open Liberty 21.0.0.6-beta further expanded on this compatability by including new Jakarta EE9 supporting features, and 21.0.0.10-beta offers the same compatability with Jakarta EE9 with performance enhancements.

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, here are the coordinates:

<dependency>
    <groupId>io.openliberty.beta</groupId>
    <artifactId>openliberty-jakartaee9</artifactId>
    <version>20.0.0.10-beta</version>
    <type>zip</type>
</dependency>

Or for Gradle:

dependencies {
    libertyRuntime group: 'io.openliberty.beta', name: 'openliberty-jakartaee9', version: '[20.0.0.10-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.


September 07, 2021 12:00 AM

Simplicity By Design, Microservices and Databases, Vanilla JS, SSO, Scopes, Hibernate, ARM--or 90th airhacks.tv

by admin at September 06, 2021 02:52 PM

Questions and topics: https://gist.github.com/AdamBien/922912f35792b9e722950d5d1407eca7 for the 90th airhacks.tv. Live on https://www.youtube.com/c/bienadam/live:
  1. Simplicity by Design with Microprofile and Jakarta EE today
  2. Every microservice has its own database and the impact on JPA
  3. A vanilla JS report engine
  4. Single sign on with EJBs, REST and Wildfly
  5. Microservices and @ApplicationScoped vs. @RequestScoped
  6. Hibernate vs. JPA
  7. Java EE on ARM

See you every first Monday of the month at https://airhacks.tv 8pm CET (UTC+1:00). Show is also announced at: meetup.com/airhacks.

Any questions left? Ask now: https://gist.github.com/AdamBien/922912f35792b9e722950d5d1407eca7 and get the answers at the next airhacks.tv.


by admin at September 06, 2021 02:52 PM

Java, Blues and Tomitribe--an airhacks.fm podcast

by admin at September 05, 2021 02:02 PM

Subscribe to airhacks.fm podcast via: spotify| iTunes| RSS

The #155 airhacks.fm episode with David Blevins (@dblevins) about:
early Java, blues and B.B. King and a bit of Tomitribe
is available for download.

by admin at September 05, 2021 02:02 PM

Hashtag Jakarta EE #88

by Ivar Grimstad at September 05, 2021 09:59 AM

Welcome to the eighty-eighth issue of Hashtag Jakarta EE!

The release plan for Jakarta EE Core Profile 10 has been published by the Jakarta EE Platform project. I won’t go through every detail of it here, but I wanted to list the specifications that are proposed to be part of the first version of Jakarta EE Core Profile.

As you can derive from this list is that Jakarta EE Core Profile is focused on providing a minimal foundation for smaller runtimes that are suitable for microservices and also allows for ahead-of-time compilation. The TCK will be made available standalone and will be possible to execute on Java SE 11 and Java SE 17. The plan is to release Jakarta EE Core Profile in the same timeframe as Jakarta EE Platform and Web Profile, which is scheduled for Q1, 2022.

Last week, I had the pleasure of being a guest at the Journey to Jakarta podcast by Foojay together with Rudy De Busscher, Josh Juneau, and the host Erik Costlow. Listen in to hear us chat about the modernization of the Jakarta EE Platform, the importance of backward compatibility, and much more…

At the end of this Hashtag, I want to point you to the announcement that Spring 6.0 will be baseline with Java 17 and Jakarta EE 9. Juergen Hoeller explains all about the reasoning behind this decision in the post A Java 17 and Jakarta EE 9 baseline for Spring Framework 6. Spring 6.0 is planned to be released in Q4 2022.


by Ivar Grimstad at September 05, 2021 09:59 AM

Again on Adam Bien’s airhacks.fm #84 | Podcast | Interview | Background Report

by Markus Karg at September 04, 2021 03:00 PM

Adam Bien called me once more and asked for another interview for his #airhacks.fm #podcast series (https://airhacks.fm/). This time we had a nice chat about JAX-RS in particular, and some other topics. In case you missed the original streaming, by courtesy of Adam here is a recording of the complete interview in full length.

If you like this video, please give it a thumbs up, share it, subscribe to my channel, or become my patreon https://www.patreon.com/mkarg. Thanks! 🙂

Stay safe and… Party On!


by Markus Karg at September 04, 2021 03:00 PM

Is the Java EE Deployment Model Out of Date? Watch The Video.

by Priya Khaira-Hanks at September 02, 2021 08:00 AM

We are now sharing the FINAL video in our'Dismiss the Myths: Get to Know Jakarta EE (Java EE)'. 

This one asks the question: 'Is the Java EE Deployment Model Out of Date?'. We definitely don't think so! 

Steve Millidgeshows you why the Java EE (Jakarta EE) deployment model is not old fashioned or out of date - and goes into battle with Spring!


by Priya Khaira-Hanks at September 02, 2021 08:00 AM

Markus on vacation! | The Two Minutes Tuesday 031 | OpenJDK Contribution

by Markus Karg at August 31, 2021 09:00 PM

Guys, I am on vacation, so there won’t be a new video this week. Sorry for that. I know it’s hard, but you need to learn to live with it!

Also my #OpenJDK contribution to improve the performance of #Java’s InputStream::transferTo method is still not merged, as the reviewers have new funny ideas what cases to cover with tests every other night. I know you are desparately waiting for the making-of, but it definitively will need some more weeks until the contribution is done, hence the video is done.

For the time being, look forward to meet me at a conference: Java Forum Stuttgart 2021, EclipseCon 2021, and certainly JavaLand 2022! Or joing my next liveshow #ToniteWithMe if you can’t live without me for such a long time!

If you like this video, please give it a thumbs up, share it, subscribe to my channel, or become my patreon https://www.patreon.com/mkarg. Thanks! 🙂

CU!


by Markus Karg at August 31, 2021 09:00 PM

Using Tomcat’s `tomcat-users.xml` with Jakarta Security in TomEE

by Jean-Louis Monteiro at August 31, 2021 03:09 PM

While working on Jakarta EE 10 certification (See announcement Apache Tomee Jakarta EE certified after 10 years, Apache TomEE implemented Jakarta Security specification. 

Currently, there is only one implementation used in Glassfish and used by all the other vendors for Jakarta Security. In TomEE, we decided to create an alternative to bring some diversity, and have an Apache implementation.

What is Jakarta Security?

Jakarta Security defines a standard for creating secure Jakarta EE applications in modern application paradigms. It defines an overarching (end-user targeted) Security API for Jakarta EE Applications.

Jakarta Security builds on the lower level Security SPIs defined by Jakarta Authentication and Jakarta Authorization, which are both not end-end targeted.

What are we going to do?

This blog will show how to leverage Jakarta Security to implement authentication and authorization on a simple JAX RS application using Tomcat tomcat-users.xml file.

Why tomcat-users.xml?

Tomcat has created this simple file to store users and roles. It is commonly used in development or simple applications, usually using Tomcat realms.

In the Apache implementation of Jakarta Security, we decided to support “out of the box” tomcat-users.xml as a built-in identity store.

What is an identity store?

An identity store is a database or a directory (store) of identity information about a population of users that includes an application’s callers.

In essence, an identity store contains all information such as caller name, groups or roles, and required information to validate a caller’s credentials.

Example

An example has been created and committed to the Apache TomEE repository under the Examples section (https://github.com/apache/tomee/tree/master/examples/security-tomcat-user-identitystore). This is a self contained example you can check out and run on your laptop. It should contain all information and the minimum required configuration and code.

Configuration

In terms of configuration, there are a couple of important things to do.

1/ define some users with roles in tomcat-users.xml 

<tomcat-users>
 <user name="tomcat" password="tomcat" roles="tomcat"/>
 <user name="user" password="user" roles="user"/>

 <user name="tom" password="secret1" roles="admin,manager"/>
 <user name="emma" password="secret2" roles="admin,employee"/>
 <user name="bob" password="secret3" roles="admin"/>
</tomcat-users>

2/ Protect your JAX RS resource

<web-app
 xmlns="http://xmlns.jcp.org/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
 version="3.1"
>
 <!-- Security constraints  -->
 <security-constraint>
   <web-resource-collection>
     <web-resource-name>Protected admin resource/url</web-resource-name>
     <url-pattern>/api/movies/*</url-pattern>
     <http-method-omission>GET</http-method-omission>
   </web-resource-collection>
   <auth-constraint>
     <role-name>admin</role-name>
   </auth-constraint>
 </security-constraint>
</web-app>

Show me the code

The code is rather simple and uses plain JAX RS APIs. The only thing to remember is to define the identity store and the authentication mechanism, both with an annotation such as: 

@Path("/movies")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@TomcatUserIdentityStoreDefinition
@BasicAuthenticationMechanismDefinition
@ApplicationScoped
public class MovieAdminResource {

   private static final Logger LOGGER = Logger.getLogger(MovieAdminResource.class.getName());

   @Inject
   private MovieStore store;

   // JAXRS security context also wired with Jakarta Security
   @Context
   private javax.ws.rs.core.SecurityContext securityContext;

   @POST
   public Movie addMovie(final Movie newMovie) {
       LOGGER.info(getUserName() + " adding new movie " + newMovie);
       return store.addMovie(newMovie);
   }

   // See source file for full content
   private String getUserName() {
       if (securityContext.getUserPrincipal() != null) {
           return String.format("%s[admin=%s]",
                                securityContext.getUserPrincipal().getName(),
                                securityContext.isUserInRole("admin"));
       }
       return null;
   }
}
  • Selecting the identity store: as explained above, TomEE implementation supports “out of the box” the required LDAP and Datasource identity store using standard annotations (example coming soon). TomEE also created a new annotation to add support for `tomcat-users.xml` from Tomcat. This is done using @TomcatUserIdentityStoreDefinition.
  • Selecting the authentication mechanism: specification requires Basic, Form and Custom Form to be supported. In this example, we used @BasicAuthenticationMechanismDefinition (more examples coming soon).

Testing with TomEE serverless

In this example, we decided to use TomEE serverless to write the tests.

public class MovieResourceTest {

   private static URI serverURI;

   @BeforeClass
   public static void setup() {
       // Add any classes you need to an Archive
       // or add them to a jar via any means
       final Archive classes = Archive.archive()
               .add(Api.class)
               .add(Movie.class)
               .add(MovieStore.class)
               .add(MovieResource.class)
               .add(MovieAdminResource.class);

       // Place the classes where you would want
       // them in a Tomcat install
       final Server server = Server.builder()
               // This effectively creates a webapp called ROOT
               .add("webapps/ROOT/WEB-INF/classes", classes)
               .add("webapps/ROOT/WEB-INF/web.xml", new File("src/main/webapp/WEB-INF/web.xml"))
               .add("conf/tomcat-users.xml", new File("src/main/resources/conf/tomcat-users.xml"))
               .build();

       serverURI = server.getURI();
   }

   @Test
   public void getAllMovies() {
       final WebTarget target = ClientBuilder.newClient().target(serverURI);

       final Movie[] movies = target.path("/api/movies").request().get(Movie[].class);

       assertEquals(6, movies.length);

       final Movie movie = movies[1];
       assertEquals("Todd Phillips", movie.getDirector());
       assertEquals("Starsky & Hutch", movie.getTitle());
       assertEquals("Action", movie.getGenre());
       assertEquals(2004, movie.getYear());
       assertEquals(2, movie.getId());
   }

   @Test
   public void addMovieAdmin() {
       final WebTarget target = ClientBuilder.newClient()
                                             .target(serverURI)
                                             .register(new BasicAuthFilter("tom", "secret1"));

       final Movie movie = new Movie("Shanghai Noon", "Tom Dey", "Comedy", 7, 2000);

       final Movie posted = target.path("/api/movies").request()
               .post(entity(movie, MediaType.APPLICATION_JSON))
               .readEntity(Movie.class);

       assertEquals("Tom Dey", posted.getDirector());
       assertEquals("Shanghai Noon", posted.getTitle());
       assertEquals("Comedy", posted.getGenre());
       assertEquals(2000, posted.getYear());
       assertEquals(7, posted.getId());
   }

}

The #setup() method is used to create the webapp and start TomEE serverless.

In the tests, you may notice we are using JAX RS WebClient with a Client filter to automatically compute and add the Authorization header to the request.

public class BasicAuthFilter implements ClientRequestFilter {
   private final String username;
   private final String password;

   public BasicAuthFilter(final String username, final String password) {
       this.username = username;
       this.password = password;
   }

   @Override
   public void filter(final ClientRequestContext requestContext) throws IOException {
       requestContext.getHeaders()
                     .add(AUTHORIZATION,
                          "Basic " + new String(Base64.getEncoder().encode((username + ":" + password).getBytes())));
   }
}

The post Using Tomcat’s `tomcat-users.xml` with Jakarta Security in TomEE appeared first on Tomitribe.


by Jean-Louis Monteiro at August 31, 2021 03:09 PM

How to Generate Values of Basic Entity Attributes with Hibernate

by Thorben Janssen at August 31, 2021 12:00 PM

The post How to Generate Values of Basic Entity Attributes with Hibernate appeared first on Thorben Janssen.

Hibernate and the JPA specification define multiple generators to create unique primary key values. An obvious question when learning about these generators is if you can apply them to basic attributes as well. Unfortunately, the answer is no. But Hibernate’s ValueGenerator provides an easy-to-use alternative. As I will show you in this article, you can […]

The post How to Generate Values of Basic Entity Attributes with Hibernate appeared first on Thorben Janssen.


by Thorben Janssen at August 31, 2021 12:00 PM

Hashtag Jakarta EE #87

by Ivar Grimstad at August 29, 2021 09:59 AM

Welcome to the eighty-seventh issue of Hashtag Jakarta EE!

If you haven’t done so yet, I want to remind you of the JakartaOne Livestream 2021 Call for Papers. The CFP closes on September 15, so there is still time to have a chance of speaking to a global audience in the third edition of this annual event.

As I mentioned last week, the release plan for Jakarta EE 10 Platform and Web Profile has been approved and published with a target release date of Q1, 2022. It is expected that details around the plan for Jakarta EE Core Profile will be announced next week. Stay tuned for updates!

Even though the focus of this blog series is Jakarta EE, a little check on what’s going on in the Adoptium working group won’t hurt. For example, did you know that Eclipse Temurin is available in Docker Hub? Just type docker pull eclipse-temurin to pull the image.

Check out the description for how to use the image, or simply try it out like this:

$ docker run -it eclipse-temurin

|  Welcome to JShell -- Version 16.0.2
|  For an introduction type: /help intro

jshell> System.out.println("Hello, World!");
Hello, World!

jshell> 

There is a wide range of tags to choose from, currently builds based on OpenJDK 8, 11, and 16.


by Ivar Grimstad at August 29, 2021 09:59 AM

Do Java EE Standards Matter? Watch The Video.

by Priya Khaira-Hanks at August 27, 2021 08:00 AM

Our'Dismiss the Myths: Get to Know Jakarta EE (Java EE)' webinar series continued with 5/6 - the penultimate video - 'Do JavaEE Standards Matter?'.

Steve Millidgeexplained why standards like Java EE (Jakarta EE) ARE beneficial.


by Priya Khaira-Hanks at August 27, 2021 08:00 AM

Panache – Repository Pattern

by Thorben Janssen at August 24, 2021 12:00 PM

The post Panache – Repository Pattern appeared first on Thorben Janssen.

Panache is a Quarkus-specific library that handles most of the boilerplate code usually required by JPA-based persistence layers. One of the features it provides is ready-to-use and easily customizable repositories for your entity classes. Repositories are a very popular pattern for Java-based persistence layers. They encapsulate the database operations you can perform on entity objects […]

The post Panache – Repository Pattern appeared first on Thorben Janssen.


by Thorben Janssen at August 24, 2021 12:00 PM

Hashtag Jakarta EE #86

by Ivar Grimstad at August 22, 2021 09:59 AM

Welcome to the eighty-sixth issue of Hashtag Jakarta EE!

The Jakarta EE 10 release plan is approved!

According to the plan, Jakarta EE 10 Platform and Web Profile is targeting a release in Q1, 2022. This is a little less than a year after Jakarta EE 9.1 (May 2021). In order to make this happen, the individual specifications that the Jakarta EE Platform and Web Profile specifications are based on must start their release process some time in advance of the proposed release date.

October 15, 2021, has previously been communicated as a target date for initiating release reviews for the specifications. The experience from the Jakarta EE 9 and 9.1 releases indicates that this is a reasonable time to start the release reviews to be able to finalize the Platform and Web Profile releases for Jakarta EE 10 in Q1.

So what about Jakarta EE Core Profile? Will it be released at the same time as the Platform and Web Profile? Well, it is possible, but unlikely. It depends on the progress of the CDI Lite specifications and maybe also Jakarta Config. The platform project will propose a release plan for Jakarta EE Core profile shortly. Join the weekly Jakarta EE Platform calls on Tuesdays 11:00 AM ET to get the latest information first and contribute to the progress. you find the details in the Jakarta EE Specifications public calendar.


by Ivar Grimstad at August 22, 2021 09:59 AM

Introducing the Open Liberty Starter!

August 20, 2021 12:00 AM

Open Liberty Starter

There is now another easy way to get started with Open Liberty. Visit the Getting Started page and select a few options to generate a starter application that runs on Open Liberty. You can specify your application and project name, choose a build tool from either Maven or Gradle, and pick which version of Java SE, Jakarta EE, and MicroProfile your application will use. Then, just click Generate Project and you are ready for lift-off!

What is the starter?

The Open Liberty starter gives you a simple, quick way to get the necessary files to start building an application on Open Liberty. There is no need to search how to find out what to add to your maven or gradle build files. A simple RestApplication.java file is generated for you to start creating a REST based application. A server.xml configuration file is provided with the necessary features for the MicroProfile and Jakarta EE versions that you previously selected.

If you plan on developing and/or deploying your app in a containerized environment, the included Dockerfile will make it easier to create your application image on top of the Open Liberty Docker image.

screen capture of the starter application options

Once you download the starter project, unpackage the .zip file on your machine.

If you selected Maven as your build tool, then open a command line session, navigate to the installation directory, and run mvnw liberty:run. This will install all required dependencies and start the default server. If successful, you will see the necessary features installed and the message "server is ready to run a smarter planet."

screen capture of the starter mvn liberty:run output

A starter project using Maven is generated for you with the following files:

screen capture of the starter maven directory structure

If you selected Gradle as your build tool, then open a command line session, navigate to the installation directory, and run gradlew libertyStart to start the default server. If successful, you will see the necessary features installed from the installFeature task and the message "server is ready to run a smarter planet."

screen capture of the starter gradlew libertyStart output

A starter project using Gradle is generated for you with the following files:

screen capture of the starter gradle directory structure

For more information on developing your application in dev mode using either Maven or Gradle, see the dev mode documentation.

For further help on getting started actually developing your application, see some of our Microprofile guides and Jakarta EE guides.

Other ways to start using Open Liberty

There are a few other ways to get started with Open Liberty if you prefer instead:

Docker image

You can pull in the official Open Liberty docker image from Docker Hub and build your application image on top of the Open Liberty image. For more information, see our guide on using Docker with Open Liberty, Using Docker containers to develop microservices.

Maven

You can also use Maven to pull in Open Liberty as a dependency for your application. To get started using Open Liberty with Maven, add the following to your pom.xml, while specifying the version of Open Liberty that you want to use:

<dependency>
    <groupId>io.openliberty</groupId>
    <artifactId>openliberty-runtime</artifactId>
    <version>[21.0.0.8,)</version>
    <type>zip</type>
</dependency>

For more information on using Open Liberty and Maven, visit our Maven Intro Guide.

Gradle

You can also use Gradle to pull in Open Liberty as a dependency for your application. To get started using Open Liberty with Gradle, add the following to build.gradle, while specifying the version of Open Liberty that you want to use:

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

For more information on using Open Liberty and Gradle, visit our Gradle Intro Guide.

Open Liberty Binary Package

Download an Open Liberty release from our Getting Started page and extract the package. Then navigate to the bin directory and execute the server create <server_name> command to create an Open Liberty server, or run the server start command to automatically create and start a defaultServer. Then, you can add in your application to the dropins directory, or add the path to your application in the newly created <path_to_Open_Liberty_install>/servers/<server_name>/server.xml.

For more information regarding Liberty commands and configuration, visit the Command overview and Server configuration overview docs.


August 20, 2021 12:00 AM

Tomcat and TomEE Clustering Automation

by Tetiana Fydorenchyk at August 18, 2021 11:29 AM

Explore the tips on how to install automatically clustered Tomcat and TomEE servers to get a highly available solution that can efficiently serve a large number of users, process a lot of traffic, and be reliable.
Tomcat TomEE Automatic Clustering

by Tetiana Fydorenchyk at August 18, 2021 11:29 AM

Gosh! Finally! | The Two Minutes Tuesday 030 | Java Live Coding

by Markus Karg at August 17, 2021 09:00 PM

Andres is back with great news: Our “skip” property now officially is part of the #Maven Shade Plugin!

I hardly couldn’t believe it when Andres told me that the contribution we developed in a recent episode of #ToniteWithMe actually got merged by the Maven team meanwhile! I went to Github and YES!!! the commit is found in the master branch and even my name is told as a co-author. How noble, as all I did was asking dumb questions! 😉

https://github.com/apache/maven-shade-plugin/commit/cf2d90caa82bf7938dd8e55d23201a2eefdf25fb

So time to join us when Andres and myself meet for the third time in this LIVE SHOW! Ask your questions in the LIVE CHAT, like: “What is this property actually good for?”. Don’t miss Friday night’s Live Show #ToniteWithMe on 20:00 CEST right here on this channel!

If you like this video, please give it a thumbs up, share it, subscribe to my channel, or become my patreon https://www.patreon.com/mkarg. Thanks! 🙂

CU!


by Markus Karg at August 17, 2021 09:00 PM

5 Hibernate Features You Should Use With Spring Data JPA

by Thorben Janssen at August 17, 2021 12:00 PM

The post 5 Hibernate Features You Should Use With Spring Data JPA appeared first on Thorben Janssen.

With Spring Data JPA, you can use more features than just the ones defined by the JPA specification. It acts as a layer on top of a persistence provider, e.g., Hibernate. This provider implements the JPA specification and provides a set of proprietary features. Due to this multi-layer architecture, you can use all standard JPA […]

The post 5 Hibernate Features You Should Use With Spring Data JPA appeared first on Thorben Janssen.


by Thorben Janssen at August 17, 2021 12:00 PM

Can Java EE Do Microservices? Watch The Video.

by Priya Khaira-Hanks at August 16, 2021 09:53 AM

4/6 in our'Dismiss the Myths: Get to Know Jakarta EE (Java EE)' webinar series was 'Can Java EE Do Microservices?' 

The answer is yes! Steve Millidge told you why. You can now watch the entire video if you missed it when it when first broadcast. 


by Priya Khaira-Hanks at August 16, 2021 09:53 AM

[LIVESTREAM] LIVE CHAT with Andres Almiray | Tonite #WithMe | Java Latenite

by Markus Karg at August 15, 2021 12:20 PM

#ToniteWithMe chatting about the #Maven contribution developed early this year here in this very latenite show is #JavaChampion Andres Almiray! Yay! 🙂

We will show you how the code works, how the contribution process looked like, and certainly what our contribution actually is good for. Any more questions? Type them in the LIVE CHAT and we will answer them in this live stream!

Don’t miss it! Andres and me LIVE on FRIDAY 20:00 CEST!

If you like this live show, please give it a thumbs up, share it, subscribe to my channel, or become my patreon https://www.patreon.com/mkarg. Thanks! 🙂


by Markus Karg at August 15, 2021 12:20 PM

Hashtag Jakarta EE #85

by Ivar Grimstad at August 15, 2021 09:59 AM

Welcome to the eighty-fifth issue of Hashtag Jakarta EE!

I am still on vacation, but you know what they say: “The Hashtag must go on…“.

The plan review for Jakarta EE 10 Platform and Web Profile has started and is happening on the public Jakarta EE Specification Committee mailing list. The proposed plan is to release Jakarta EE 10 in Q1 2022. You can find the details in the Jakarta EE 10 release plan.

I want to remind you again to submit your abstracts to the JakartaOne Livestream CFP. The Call for Paper is open until September 15, but don’t wait until the last minute! You are more likely to be accepted if you submit early, and often…


by Ivar Grimstad at August 15, 2021 09:59 AM

Is Java EE Cloud Native? Watch The Video.

by Priya Khaira-Hanks at August 11, 2021 08:41 AM

Our'Dismiss the Myths: Get to Know Jakarta EE (Java EE)' webinar series continued with 'Is Java EE Cloud Native?'

Steve Millidge, CEO & Founder of Payara Services, showed the audience that Java EE IS cloud-native and can handle microservices and containers in the cloud.


by Priya Khaira-Hanks at August 11, 2021 08:41 AM

Panache – Active Record Pattern

by Thorben Janssen at August 10, 2021 12:00 PM

The post Panache – Active Record Pattern appeared first on Thorben Janssen.

The main idea of the active record pattern is to let the entity object encapsulate the data and the database operations you can perform on it. That makes it an excellent fit for the persistence layer of a Java application. Panache, a Quarkus extension based on Hibernate, provides great support for this pattern and makes […]

The post Panache – Active Record Pattern appeared first on Thorben Janssen.


by Thorben Janssen at August 10, 2021 12:00 PM

Hashtag Jakarta EE #84

by Ivar Grimstad at August 08, 2021 09:59 AM

Welcome to the eighty-fourth issue of Hashtag Jakarta EE!

I’m out on vacation these weeks, so I will keep it short this time. The work on the Jakarta EE 10 plan continues, and will (hopefully) be completed in the platform call in the coming week. Even if I am out of office, the Jakarta EE Platform project goes on!

The agenda for EclipseCon 2021 Community Day Jakarta EE, MicroProfile, and Cloud-Native Java is complete. Please take a look and help spread the word? Also, note that EclipseCon this year is free and virtual. There is really no good reason not to attend. Read Why You Should Join EclipseCon 2021 Community Day by Resa Rahman if you’re still not convinced.

Remember the Call-for-Paper for JakartaOne Livestream is still open. It is open until September 15, but don’t wait until the last minute. You are more likely to be accepted if you submit early…


by Ivar Grimstad at August 08, 2021 09:59 AM

Why You Should Join EclipseCon 2021 Community Day

by Reza Rahman at August 07, 2021 08:27 PM

EclipseCon 2021 Community Day is on Monday, October 25 15:00 to 21:00 CET (the day before the start of the main EclipseCon conference). Community Day at EclipseCon has always been a great event for Eclipse working groups and project teams. This year both EclipseCon and Community Day is virtual and free. Space for Community Day is limited, so please register and save your spot soon.

We have a packed agenda centered on the Jakarta EE, MicroProfile and Cloud Native Java communities. If there is a set of very focused sessions you should attend on these topics, the agenda offers the one place this year to do so. The sessions are intended not only for learning, but also for the community to actively engage with some key leaders.

Myself, Werner Keil and Petr Aubrecht are organizing on behalf of the community. We are grateful to have a very strong line-up both in terms of speakers and content. Below is a very good snapshot. Please note that all times are Central European Time (CET).

SessionTimeSpeakers
Jakarta EE Community State of the Union10/25/2020
15:00 – 15:50
Tanja Obradovic and Ivar Grimstad
MicroProfile Current and Future10/25/2020
16:00 – 16:50
Emily Jiang
What’s Coming to Jakarta Security10/25/2020
17:00 – 17:50
Arjan Tijms
Jakarta Concurrency Futures10/25/2020
18:00 – 18:50
Steve Millidge
Jakarta REST: Looking Ahead 10/25/2020
19:00 – 19:50
Andy McCright
Jakarta NoSQL and the Future of Polyglot Persistence in Java 10/25/2020
20:00 – 20:50
Otavio Santana

Tanja Obradovic and Ivar Grimstad from the Eclipse Foundation will be providing a good overview of the current status of Jakarta EE in Jakarta EE Community State of the Union. This will include Jakarta EE 9, Jakarta EE 9.1 as well as Jakarta EE 10. If there is one session to learn about Jakarta EE status, get involved and ask questions, this session is it.

IBM’s Emily Jiang will be doing the same thing for MicroProfile in MicroProfile Current and Future. So if you want to know about MicroProfile, this is the session you should make a point to attend. Emily will cover MicroProfile 4.0, MicroProfile 4.1 and MicroProfile 5.0.

The Security API is likely be to a key component of Jakarta EE 10. In What’s Coming to Jakarta Security, Arjan Tijms will be covering the likely changes as well as how you can contribute.

Steve Millidge will do the same thing for the Concurrency API in Jakarta Concurrency Futures. Similar to the Security API, the Concurrency API will play an important role in Jakarta EE 10.

REST continues to be one of the more active and popular technologies in the Jakarta EE family. In Jakarta REST – Looking Ahead, IBM’s Andy McCright will cover some of the important changes you can expect in the REST API for Jakarta EE 10.

Last but certainly not least, Otavio Santana will provide an overview of the new NOSQL API in Jakarta NoSQL and the Future of Polyglot Persistence in Java. He will overview the API, discuss what is available right now, what is coming and how you can contribute.

For further details, please look here. You will find session abstracts, speaker profiles and more. We have worked hard to organize a strong agenda on your behalf and we hope you will join us.

Please note these views are my own and do not reflect the views of Microsoft as a company.


by Reza Rahman at August 07, 2021 08:27 PM

I’m on Adam Bien’s airhacks.fm #82 | Podcast | Interview | Background Report

by Markus Karg at August 07, 2021 03:00 PM

Adam Bien called me some months back and asked for an interview for his #airhacks.fm #podcast series (https://airhacks.fm/). I was rather excited about this honour and gave him a background report, how I came to programming, and my way from Sinclair ZX Spectrum 48K to JAX-RS and Microservices. And in case you missed the original streaming, by courtesy of Adam here is a recording of the complete interview in full length.

If you like this video, please give it a thumbs up, share it, subscribe to my channel, or become my patreon https://www.patreon.com/mkarg. Thanks! 🙂

Stay safe and… Party On!


by Markus Karg at August 07, 2021 03:00 PM

Endpoint activation monitoring and more now available on Open Liberty 21.0.0.9-beta

August 06, 2021 12:00 AM

Open Liberty 21.0.0.9-beta offers exciting new enhancements for Liberty embedders such as endpoint activation monitoring to determine when endpoints are available to use.

We have two beta packages for Open Liberty:

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

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

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.

All Beta Features package

The All Beta Features package includes the following beta features:

New method to determine active endpoints

The ServerEndpointControlMBean can currently be used to pause and resume endpoints, including HTTP and messaging ports. It can also determine if an endpoint is currently paused. However, there is no way to determine programmatically if an endpoint exists and is active. This update provides a new method on the mbean, isActive, that will determine if an endpoint exists, has started, and is not paused. A new method was added to the ServerEndpointControlMBean:

public boolean isActive(String targets);

The targets parameter is a comma separated list of endpoint names.

This mirrors the existing isPaused method. It will return true only if all of the endpoints listed exist, are started, and are not paused.

// Check if the defaultHttpEndpoint is active
boolean isEndpointActive = mbean.isActive("defaultHttpEndpoint");

For more information about ServerEndpointControlMBean methods, refer to the API documentation.

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, here are the coordinates:

<dependency>
  <groupId>io.openliberty.beta</groupId>
  <artifactId>openliberty-runtime</artifactId>
  <version>21.0.0.9-beta</version>
  <type>pom</type>
</dependency>

Or for Gradle:

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

Or take a look at our Downloads page.

MicroProfile 4.1 Beta Features

MicroProfile 4.1 was originally released in the Open Liberty Beta 21.0.0.8-beta and it is also in this beta. More information on MicroProfile 4.1 is available here.

Jakarta EE 9 Beta Features package

Open Liberty is the first vendor product to be Jakarta EE Web Profile 9.0 compatible since the 21.0.0.2-beta release. Open Liberty is also the first vendor product to be added to the Jakarta EE Platform 9.0 compatability list, with the release of 21.0.0.3-beta. Open Liberty 21.0.0.6-beta further expanded on this compatability by including new Jakarta EE9 supporting features, and 21.0.0.9-beta offers the same compatability with Jakarta EE9 with performance enhancements.

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, here are the coordinates:

<dependency>
    <groupId>io.openliberty.beta</groupId>
    <artifactId>openliberty-jakartaee9</artifactId>
    <version>21.0.0.9-beta</version>
    <type>zip</type>
</dependency>

Or for Gradle:

dependencies {
    libertyRuntime group: 'io.openliberty.beta', name: 'openliberty-jakartaee9', version: '[20.0.0.9-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.


August 06, 2021 12:00 AM

I DOUBLED InputStream Performance! | The Two Minutes Tuesday 029 | Java Inside

by Markus Karg at August 03, 2021 09:00 PM

I was asked how far my contribution to #OpenJDK is: While I am still working on edge cases, performance of InputStream::transferTo is already doubled (!!!) and I think that in one of my next videos I can show you the final code that will hopefully be part of #Java 18! 

Sorry for the bad light quality. My wife and me are still sick from our second shot of Biontech, so we could not invest as much time and love into this video as we normally do.

If you like this video, please give it a thumbs up, share it, subscribe to my channel, or become my patreon https://www.patreon.com/mkarg. Thanks! 🙂

CU!


by Markus Karg at August 03, 2021 09:00 PM

Spring Data JPA – How to Return DTOs from Native Queries

by Thorben Janssen at August 03, 2021 12:00 AM

The post Spring Data JPA – How to Return DTOs from Native Queries appeared first on Thorben Janssen.

When using Spring Data JPA, you are used to derived and custom queries that return the result in your preferred format. A typical example is a DTO projection, which is the most efficient one for read-only operations. To use it in a derived or custom JPQL query, you only need to change the return type […]

The post Spring Data JPA – How to Return DTOs from Native Queries appeared first on Thorben Janssen.


by Thorben Janssen at August 03, 2021 12:00 AM

Hashtag Jakarta EE #83

by Ivar Grimstad at August 01, 2021 09:59 AM

Welcome to the eighty-third issue of Hashtag Jakarta EE!

Last week’s platform call was devoted entirely to the Jakarta EE 10 release plan. The platform team is in agreement, and only a last brushup is needed before the plan is submitted for plan review by the Jakarta EE Specification Committee.

As expected from the discussion around adding Jakarta MVC to the Jakarta EE Web Profile, it looks like MVC will continue as an independent specification for a while longer. The reasoning behind this decision is that most application server vendors would like to see more adoption before adding it to the platform. It is kind of a chicken-and-egg situation as inclusion in the platform would most likely result in far more adoption than as it is today. The good news is that Eclipse Krazo is certified as a compatible implementation for runtimes based on both Eclipse Jersey and RESTEasy.

Using Eclipse Krazo Jersey with Eclipse Jersey

<dependency>
  <groupId>jakarta.mvc</groupId>
  <artifactId>jakarta.mvc-api</artifactId>
  <version>2.0.0</version>
</dependency>

<dependency>
  <groupId>org.eclipse.krazo</groupId>
  <artifactId>krazo-core</artifactId>
  <version>2.0.1</version>
</dependency>
<dependency>
  <groupId>org.eclipse.krazo</groupId>
  <artifactId>krazo-jersey</artifactId>
  <version>2.0.1</version>
</dependency>

Using Eclipse Krazo with RESTEasy

<dependency>
  <groupId>jakarta.mvc</groupId>
  <artifactId>jakarta.mvc-api</artifactId>
  <version>2.0.0</version>
</dependency>

<dependency>
  <groupId>org.eclipse.krazo</groupId>
  <artifactId>krazo-core</artifactId>
  <version>2.0.1</version>
</dependency>
<dependency>
  <groupId>org.eclipse.krazo</groupId>
  <artifactId>krazo-resteasy</artifactId>
  <version>2.0.1</version>
</dependency>

In addition to this, Eclipse GlassFish 6.2.0 is also a certified compatible implementation of Jakarta MVC, so if you’re using this version of GlassFish, no configuration is needed. Just go ahead and create your MVC applications.

The Call-for-Paper for the third edition of JakartaOne Livestream is open. It is open until September 15, but don’t wait until the last minute. You are more likely to be accepted if you submit early…


by Ivar Grimstad at August 01, 2021 09:59 AM

The Payara Monthly Catch: July 2021

by Priya Khaira-Hanks at July 29, 2021 02:45 PM

Welcome to our July Payara Monthly Catch - a collection of articles, videos & podcasts around Java, Jakarta EE, MicroProfile, open source and cloud computing. This month, the list mixes up quirky content you may not have seen - weird programming facts, tips on using the Snowflake Database - to insight from some of the most esteemed experts in the industry. Payara Platform has also been appearing all over the web, as influencers and our community use it in demos and discuss our products in conferences. Find out where Payara can be found across external blogs, conferences and media outlets in our 'Featuring Payara and Payarans' section.

On the internal news side, we announced that Payara Server Community 6.2021.1.Alpha1 is now a Certified Jakarta EE 9.1 9.1 (Full Profile) Compatible Product! Even though we aren't encouraging users to run Payara Server 6 in production yet - you can achieve the same result, migrating to Java SE 11, in Payara Server 5 - this is important news in the journey of Payara Platform products alongside Jakarta EE.

We also published a full summary of what we got up to for our annual team-bonding company event, Payara Week - from chocolate Payara fishes to cocktail making challenges, open source business model learning to daily workshops. Make sure you read ithere! You can also watch videos from our summer webinar series, 'Dismiss the Myths: Get to know Java EE / Jakarta EE'here - the second half of the sessions took place this month.


by Priya Khaira-Hanks at July 29, 2021 02:45 PM

Jakarta Community Acceptance Testing (JCAT)

by javaeeguardian at July 28, 2021 05:41 AM

Today the Jakarta EE Ambassadors are announcing the start of the Jakarta EE Community Acceptance (JCAT) Testing initiative. The purpose of this initiative is to test Jakarta EE 9/9.1 implementations testing using your code and/or applications. Although Jakarta EE is extensively tested by the TCK, container specific tests, and QA, the purpose of JCAT is for developers to test the implementations.

Jakarta EE 9/9.1 did not introduce any new features. In Jakarta EE 9 the APIs changed from javax to jakarta. Jakarta EE 9.1 raised the supported floor to Java 11 for compatible implementations. So what are we testing?

  • Testing individual spec implementations standalone with the new namespace. 
  • Deploying existing Java EE/Jakarta EE applications to EE 9/9.1.
  • Converting Java EE/Jakarta EE applications to the new namespace.
  • Running applications on Java 11 (Jakarta EE 9.1)

Participating in this initiative is easy:

  1. Download a Jakarta EE implementation:
    1. Java 8 / Jakarta EE 9 Containers
    2. Java 11+ / Jakarta EE 9.1 Containers
  2. Deploy code:
    1. Port or run your existing Jakarta EE application
    2. Test out a feature using a starter template

To join this initiative, please take a moment to fill-out the form:

 Sign-up Form 

To submit results or feedback on your experiences with Jakarta EE 9/9.1:

  Jakarta EE 9 / 9.1 Feedback Form

Resources:

Start Date: July 28, 2021

End Date: October 1, 2021


by javaeeguardian at July 28, 2021 05:41 AM

Introduction to Panache

by Thorben Janssen at July 27, 2021 12:00 PM

The post Introduction to Panache appeared first on Thorben Janssen.

Panache is a Quarkus-specific library that simplifies the development of your Hibernate-based persistence layer. Similar to Spring Data JPA, Panache handles most of the repetitive boilerplate code for you. Its implementations of the repository and the active record pattern provide methods to create, update, and remove records, perform basic queries, and define and execute your […]

The post Introduction to Panache appeared first on Thorben Janssen.


by Thorben Janssen at July 27, 2021 12:00 PM

Hashtag Jakarta EE #82

by Ivar Grimstad at July 25, 2021 09:59 AM

Welcome to the eighty-second issue of Hashtag Jakarta EE!

One of the goals the Jakarta EE platform project is working towards is to create some sort of predictability regarding Java SE with future Jakarta EE releases. It seems that we are approaching something that looks like a strategy regarding this goal.

As previously announced, Jakarta EE 10 will be based on Java SE 11. That means that the specification projects will be able to use Java SE 11 language features in their APIs.

The TCK will be possible to run with any version from 11 and above.

For Jakarta EE 11, the Java SE version will be raised to the next LTS release, which will be Java SE 17. And so on…

What this means for the individual component specification teams, is that they can embrace Java SE language features of the version supported by the platform they plan to target. An example:

The specification Jakarta Wombat 1.1 use Java SE 11 language features and target Jakarta EE 10 while Jakarta Wombat 1.2 use Java SE 17 language features (e.g. Records) and thus target Jakarta EE 11
An implementation of Jakarta Wombat, e.g. Possum can use Java SE 17 features both for Possum 1.0 which implements Jakarta Wombat 1.1, and Possum 2.0 which implements Jakarta Wombat 1.2.

The release plan for Jakarta EE 10 is out for review by the Jakarta EE platform project. Hopefully, we will be able to wrap up the discussions in the platform call on Tuesday, and propose this plan for review by the Jakarta EE specification committee.

Earlier this year, I participated in the Foojay Virtual Tour with a talk at KnoxJava JUG. For the upcoming Virtual Foojay OpenJDK 17+ JUG Tour, I have a new talk called Leveraging OpenJDK 17 features with Jakarta EE. If you would like to hear about this in your JUG, do follow the instruction on foojay.io to sign up.


by Ivar Grimstad at July 25, 2021 09:59 AM

OpenJDK Live Hacking | The Two Minutes Tuesday 028 | Core #Java

by Markus Karg at July 20, 2021 09:00 PM

In my LIVE SHOW #ToniteWithMe on next Friday, 20:00 CDE, you can take a look inside of the #OpenJDK team: Roman Kennke, the lead of Shenandoah GC, will talk with me about his work on the #JVM!

Ask you own questions in the LIVE CHAT and get answers from a professional JVM coder!

If you like this video, please give it a thumbs up, share it, subscribe to my channel, or become my patreon https://www.patreon.com/mkarg. Thanks! 🙂

CU!


by Markus Karg at July 20, 2021 09:00 PM

How and when to use JPA’s getReference() Method

by Thorben Janssen at July 20, 2021 12:00 PM

The post How and when to use JPA’s getReference() Method appeared first on Thorben Janssen.

With the T getReference(Class<T> entityClass, Object primaryKey) and the T find(Class<T> entityClass, Object primaryKey) method, JPA’s EntityManager seems to provide 2 methods that do the same. Both of them seem to get an entity by its primary key from the database. There obviously is a difference between the 2 methods. An established and well-defined API […]

The post How and when to use JPA’s getReference() Method appeared first on Thorben Janssen.


by Thorben Janssen at July 20, 2021 12:00 PM

Hashtag Jakarta EE #81

by Ivar Grimstad at July 18, 2021 09:59 AM

Welcome to the eighty-first issue of Hashtag Jakarta EE!

Last week we hosted the Jakarta EE Update call. If you missed it, don’t despair as it was recorded. As usual, it will be cut into smaller themed pieces and published on the Jakarta EE YouTube channel.

The Jakarta EE Platform project has stated a clarification regarding the Java SE level for Jakarta EE 10. The component specifications are recommended, not recommended to compile their API jar files to Java SE 11. That means that they can compile to lower Java SE levels if it fits them better. The recommendation, however, is still to compile to Java SE 11 using the --release option to the compiler. Exemplified here by the maven compiler plugin configuration.

...
    <maven.compiler.release>11</maven.compiler.release>
...

The topic of release cadence and time-based vs feature-based continues. I suspect this to be the major discussion point in the platform call next week. One of the questions that are being discussed is whether to tie the roadmap and release cadence to the Java SE LTS releases, effectively meaning a three-year release cycle for the Jakarta EE Platform and Profiles. Please join in on the discussions on the mailing list and the weekly platform project calls.

The JakartaOne Livestream 2021 Call-for-Paper is open! Take this opportunity and submit your talk to the third edition of this one-day virtual conference. If you are a new speaker, take a look at the previous editions for inspiration. If you have spoken at any of, or both, the previous events, make sure to complete your collection of the JakartaOne Livestream buttons.


by Ivar Grimstad at July 18, 2021 09:59 AM

Understanding Jakarta Security with TomEE

by Jean-Louis Monteiro at July 15, 2021 05:13 PM

There are many blogs explaining how to get Jakarta Security on Tomcat using all sorts of libraries and wiring everything manually. So many opportunities to get it wrong, if you are evaluating or currently using Apache TomEE.

In TomEE, the good news is that, like JAX-RS, CDI or Bean Validation, Jakarta Security is out of the box ready to be used like Servlet, and CDI for example.

This blog is a high-level view so you have the big picture of the technologies and how they interact with each other in the security landscape. The goal is to be able to use them when needed, and quickly!

If you are looking into something detailed for each technology, I would suggest joining the mailing lists for the different Jakarta projects and get in touch with the committers. Good opportunity to contribute now that everything is open sourced. For further TomEE contributions or inquiries, you can also join the TomEE mailing lists.

Why is Jakarta Security important?

Jakarta Security API (code name JSR 375) first appeared quite recently, in Java EE 8. Most people would say, it’s been on the platform for quite a long time. Why is there a need for another specification?

First, it actually took over 20 years for Java EE to start having some kind of lightweight security for applications. Before that, the only thing available was in Java SE to secure the code itself, and that was mainly in the context of the Applets because they were running on the client-side. On a regular Java EE / Jakarta EE environment, the code is trusted as it is ours and it’s also running in our trusted environment (static user with static permissions or roles depending on the environment they were running in). So I don’t know if many companies are really using that. What needs to be addressed, in this context, isn’t how to secure the code itself, but who is calling us, and what can he/she do.

Servlet and Principal

The first notion of Principal and roles appeared in a very light, blurry, and hard-coded manner in the Servlet specification (J2EE 1.2). It’s still there today, security roles and security constraints defined in the web.xml, some HttpServletRequest request methods to retrieve the Principal or to test if a user has a role or not. Then, in terms of authentication, a finite list of hard-coded values (like BASIC, FORM, etc), that each implementation could implement the way they wanted. Even in Tomcat, until recently at least, the concepts of Realm and Authenticator were hardcoded and not extensible. With these improvements based on the Servlet specification, users and roles were a variable, but there was nothing specified for the authentication mechanisms. So each server was doing its own thing, again preventing any kind of portability.

JAAS (Java Authentication and Authorization Service)

It is only in J2EE 1.4, that an answer was given with JAAS. At first glance, it looked like the missing part of the puzzle was to implement user centric security in Java EE. In practise, it added a bit more fuzzy zone allowing application servers to keep implementing their own stuff. For example, JAAS did not really define how to assign Login modules to a specific application. It did not mention, either how to distinguish between the Principal returned by the getUserPrincipal, or the list of Principals representing the roles. And finally, still, nothing to address the notion of identity store where users and roles will be stored.

One gap was filled in J2EE 1.4 with JACC (explained here after). It took out some misunderstandings and unspecified areas, especially on how to model URL constraints in Servlets, and the same for method permissions in Java SE (yes, back to the beginning lol). Even though it allowed some clarifications, it also introduced a significant complexity draining all the efforts. 

For some reason, it took another 10 years after Servlet security was introduced, for the Java platform to realize the authentication part never got addressed. JASPIC was added very recently in Java EE 6. It really added value by clarifying the interfaces and standards around authentication mechanisms. Again, something was missing, it was the ability for an application to register an authentication module. Tomcat 8.5, for instance, implemented JASPIC, and allowed such a thing with a jaspic-provider.xml configuration file.

JACC – Authorization 

In France, we have a well known joke, “Pourquoi faire simple quand tu peux faire compliqué ?”, which literally means, “Why should you do it simple when you can do it complicated?”

This has always been my feeling with JACC (Java Authorization Contract for Containers). It was added back in J2EE 1.4 to define a contract between Java EE application servers and an authorization policy provider. This is, in essence, an entry point that allows you to define your own java.security.Permission classes. It got a few minor updates over the course of the Java EE releases, but nothing that makes it easier to understand. 

If you start asking around, you will probably get the answer, “I have no idea what this thing does and what it’s for”, and that’s putting it politely.

JACC provides you with a hook into the authorization process. I said only authorization, aka can the user/caller access resource A (a web URL for instance). It does not, at all, address the authentication part (identify the caller and make sure it’s the person it’s pretending to be).

Then, there is the part to actually use it:

  • Like in Servlet, EJB or JAX-RS, you can get at any time the caller/user logged in. In this case, you will simply do `Subject subject = (Subject) PolicyContext.getContext(“javax.security.auth.Subject.container”);`

You can, of course, realize that: 

  • In EJB, you would get SessionContext (or any other subclass of EJBContext) injected so you could call `getCallerPrincipal()`. It returns a Principal and not a Subject.
  • In Servlet, you can, from the HttpServletRequest call, `getUserPrincipal()`. It also returns a Principal. Notice that it’s user, and not caller, for HttpServletRequest.
  • In JAX-RS, you can get the jakarta.ws.rs.core.SecurityContext injected (be careful with the package as there are more …) and then call getUserPrincipal().

JASPIC – Authentication

Arjan Tijms summarizes it as “It’s a thin API that enables building fully standardized and pluggable authentication modules”.

The primary goal was to create a standard interface for Servlet containers supported mechanisms. Even though today, most of the Servlet containers such as Tomcat (and therefore TomEE) or Jetty support JASPIC, the adoption of it was very slow.

Like any specification in the early days, JASPIC had its own set of issues:

  • Too generic because we wanted it to be flexible and usable for any kind of application and authentication,
  • But there was no way for an application to register its own authentication module.

In the end, portability was impossible most of the time. And even more so, because the TCK is lacking coverage in that area, which means everyone can pretty much claim to be compliant.

Java EE 7 came with an updated version of JASPIC, 1.1 to fix those issues and also clarify some interaction with the Servlet API.

So what’s up with Jakarta Security API?

Jakarta Security API depends on JASPIC and is implemented as a JASPIC authentication module. The goal was to use JASPIC under the cover, but address issues especially the ability for an application to configure its security. This is, of course, particularly important for cloud deployments, because we don’t want anything outside of the war deployment.

The goal was also to remove all unspecified parts leading to vendors having their own configuration, solutions for very simple things like: 

  • switching from one identity provider to another
  • switching from Basic to Form authentication mechanism
  • applying session to propagate authentication to subsequent http requests
  • supporting remember me

Did you find this blog useful? Get ready for the next couple of blog posts that are going to technically demonstrate some of the features of Jakarta Security with TomEE.

 

The post Understanding Jakarta Security with TomEE appeared first on Tomitribe.


by Jean-Louis Monteiro at July 15, 2021 05:13 PM

Quarkus & Hibernate – Getting Started

by Thorben Janssen at July 13, 2021 12:00 PM

The post Quarkus & Hibernate – Getting Started appeared first on Thorben Janssen.

The Quarkus project enables you to develop Kubernetes-native applications based on Java and a huge list of well-established, Java-based frameworks. Hibernate is, of course, one of these frameworks. But the project not only enables you to build native applications with incredibly fast boot times and a very small memory footprint. It also provides a bunch […]

The post Quarkus & Hibernate – Getting Started appeared first on Thorben Janssen.


by Thorben Janssen at July 13, 2021 12:00 PM

Are Java EE Application Servers Heavy? Watch The Video.

by Priya Khaira-Hanks at July 13, 2021 08:00 AM

Our summer webinar series continued with 'Are Java EE Application Servers Heavy?'

In thismyth-busting webinar, Steve Millidge (founder of Payara), showed viewers that Java EE application servers are NOT resource-heavy or slow.  His live demonstrations showed it’s possible to have a small footprint and low resource usage in Jakarta EE runtimes.

If you missed the webinar earlier this month, you can now watch the video!


by Priya Khaira-Hanks at July 13, 2021 08:00 AM

MicroProfile 4.1 plus more exciting features now in Open Liberty 21.0.0.8-beta

July 12, 2021 12:00 AM

Open Liberty 21.0.0.8-beta introduces MicroProfile 4.1 with updates to the MicroProfile Health feature. A new logging format (TBASIC) is made available. The Stale Connection Identification feature makes it possible to provide additional configuration for a data source. A couple of Jakarta EE 9.1 convenience features are also included in the "All Beta" package.

We have two beta packages for Open Liberty:

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

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

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 one of these packages, let us know what you think.

All Beta Features package

The All Beta Features package includes the following beta features:

MicroProfile Updates

In Open Liberty 21.0.0.8-beta we have two updates: MicroProfile 4.1 improves developer experience with updates to the Health feature; MicroProfile Health 3.1 enables you to provide your own Startup health check procedures to be invoked by Open Liberty. Find out more below.

MicroProfile 4.1

MicroProfile 4.1 improves developer experience with updates to the Health feature. MicroProfile 4.1 also defines compatible implementation requirements for runtimes, which must pass all of the MicroProfile component specification TCKs including Config 2.0, Fault Tolerance 3.0, Rest Client 2.0, Health 3.1, Metrics 3.0, Open Tracing 2.0, Open API 2.0, and JWT propagation 1.2. This beta driver will be used as a compatible implementation for releasing MicroProfile 4.1.

<featureManager>
    <feature>microProfile-4.1</feature>
</featureManager>

To find out more take a look at the MicroProfile 4.1 Release.

MicroProfile Health 3.1

MicroProfile Health enables you to provide your own health check procedures to be invoked by Open Liberty, to verify the health of your microservice. A service checks its own health by performing necessary self-checks and then reports its overall status by implementing the API provided by MicroProfile Health. A self-check can be a check on anything that the service needs, such as a dependency, a successful connection to an endpoint, a system property, a database connection, or the availability of required resources. MicroProfile offers checks for both Liveness and Readiness. MicroProfile Health 3.1 introduces a new Health Check called Startup, which allows applications to define startup probes that are used for initial verification of the application before the Liveness probe takes over. This is useful for applications which require additional startup time on their first initialization.

In the previous versions of MicroProfile Health, there were no unique APIs or endpoints to distinguish the start up status of your microservices. MicroProfile Health 3.1 introduces a new convenient @Startup annotation to create your own health check procedures to verify that your microservices have fully initialized. The status of the Startup health checks of your microservices can be viewed with the new REST endpoint /health/started. You can now configure the Kubernetes Startup probe with this new endpoint as well. In Open Liberty, you can use the Startup endpoint, /health/started, to verify if your deployed applications have started or not.

When deployed application(s) are not started yet, the overall default Startup status will be DOWN, with an empty payload response until all the deployed application(s) have started. A new MicroProfile Config property (mp.health.default.startup.empty.response=UP) is available to change the overall default Startup check status to UP, during application start up.

Applications are expected to provide health check procedures by implementing the HealthCheck interface with the @Startup, @Liveness, or @readiness annotations. These are used by Open Liberty to verify the respective Startup, Liveness, or Readiness of the application. Add the logic of your health check in the call() method, and return the HealthCheckResponse object, by using the simple up()/down() methods from the API:

**Startup Check**
@Startup
@ApplicationScoped
public class StartupMemUsageCheck implements HealthCheck {
...
    @Override
     public HealthCheckResponse call() {
       ...
       if (getMemUsage() < 0.95) {
           return HealthCheckResponse.up("memUsage");
       }
       return HealthCheckResponse.down("memUsage");
       ...
     }
}

To view the status of each health check, access the http://<hostname>:<port>/health/started endpoint.

To enable the new beta features in your app, add them to your server.xml:

<feature>mpHealth-3.1</feature>

To find out more viist:

TBASIC Logging Format

A new logging format, TBASIC, is added to match the Websphere Application Server basic logging format. This new format option can be used for consoleFormat, messageFormat, or traceFormat. TBASIC format matches the existing trace BASIC format (so now either TBASIC or BASIC can be used to refer to this format for trace). Using this new format option will allow users that utilize log parsers that work with the Websphere Application Server basic format to use the same parsers with Open Liberty logs.

The new options can be used in the bootstrap.properties file:

com.ibm.ws.logging.message.format=tbasic
com.ibm.ws.logging.console.format=tbasic
com.ibm.ws.logging.trace.format=tbasic

You can also change the format by editing the server.env and adding the following lines:

WLP_LOGGING_MESSAGE_FORMAT=TBASIC
WLP_LOGGING_CONSOLE_FORMAT=TBASIC

TBASIC Logs Example:

[24/03/21 15:04:10:331 EDT] 00000001 FrameworkMana A   CWWKE0001I: The server defaultServer has been launched.
[24/03/21 15:04:11:338 EDT] 00000001 FrameworkMana I   CWWKE0002I: The kernel started after 1.177 seconds
[24/03/21 15:04:11:465 EDT] 0000003e FeatureManage I   CWWKF0007I: Feature update started.
[24/03/21 15:04:11:635 EDT] 00000033 DropinMonitor A   CWWKZ0058I: Monitoring dropins for applications.

Customizing Stale Connection Identification

Open Liberty maintains a pool of JDBC connections to improve performance. It is necessary for Open Liberty to be able to identify when connections have become stale and are no longer usable so that such connections can be removed from the pool. Open Liberty leverages multiple standards made available by the JDBC and SQL specifications, as well as relying on some built-in knowledge of vendor-specific behavior for some JDBC drivers in order to achieve this.

Not all JDBC drivers completely follow the JDBC/SQL specifications in identifying stale connections. If you are using such a JDBC driver, it is now possible for you to provide additional configuration for a data source that helps identify the vendor-specific SQL states and error codes that are raised by the JDBC driver, enabling Liberty to better maintain the connection pool.

Configure one or more <identifyException> subelements under <dataSource> to provide the SQLException identification detail.

<featureManager>
  <feature>jdbc-4.2</feature>
  <feature>jndi-1.0</feature>
  ... other features
</featureManager>

<dataSource id="DefaultDataSource" jndiName="jdbc/myDataSource">
    <jdbcDriver libraryRef="myJDBCLib"/>
    <properties databaseName="TESTDB" serverName="localhost" portNumber="1234"/>
    <!-- identify the following as stale connections, -->
    <identifyException sqlState="08000" as="StaleConnection"/>
    <identifyException errorCode="2468" as="StaleConnection"/>
    <!-- remove built-in identification of SQL state S1000 -->
    <identifyException sqlState="S1000" as="None"/>
</dataSource>

<library id="myJDBCLib">
    <file name="C:/drivers/some-jdbc-driver.jar"/>
</library>

Jakarta EE 9.1 convenience features

Jakarta EE 9.1 convenience features are included in this beta release in the "all beta" zip file, but not yet in the Jakarta EE 9 beta zip file. The 9.1 convenience features are duplicates of the Jakarta EE 9.0 convenience features. In a future beta release, the 9.0 convenience features will be removed and only the 9.1 ones will remain. Users of the Jakarta EE 9 convenience features should look to transition to use 9.1 in preparation of 9.0 being removed.

To enable the Jakarta EE 9.1 convenience features, add them to your server.xml or client.xml:

<featureManager>
    <feature>webProfile-9.1</feature>
</featureManager>
<featureManager>
    <feature>jakartaee-9.1</feature>
</featureManager>
<featureManager>
    <feature>jakartaeeClient-9.1</feature>
</featureManager>

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, here are the coordinates:

<dependency>
  <groupId>io.openliberty.beta</groupId>
  <artifactId>openliberty-runtime</artifactId>
  <version>21.0.0.8-beta</version>
  <type>pom</type>
</dependency>

Or for Gradle:

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

Or take a look at our Downloads page.

Jakarta EE 9 Beta Features package

Open Liberty 21.0.0.2-beta was the first vendor product to be Jakarta EE Web Profile 9.0 compatible. Similarly, Open Liberty 21.0.0.3-beta was the first vendor product to be added to the Jakarta EE Platform 9.0 compatibility list.. Open Liberty 21.0.0.8-beta maintains that compatibility while continuing to make quality and performance enhancements.

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 16, Java SE 11, or Java SE 8.

If you’re using Maven, here are the coordinates:

<dependency>
    <groupId>io.openliberty.beta</groupId>
    <artifactId>openliberty-jakartaee9</artifactId>
    <version>21.0.0.8-beta</version>
    <type>zip</type>
</dependency>

Or for Gradle:

dependencies {
    libertyRuntime group: 'io.openliberty.beta', name: 'openliberty-jakartaee9', version: '[21.0.0.8-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.


July 12, 2021 12:00 AM

Compiling my own JDK! | Modern Java | Head Crashing Informatics 34

by Markus Karg at July 10, 2021 03:00 PM

I am sick of several #performance flaws of the #JRE, so I downloaded the source code of #OpenJDK 17 and compiled my own custom #Java runtime! If you also want to do that, just follow the instructions in this video and start hacking on OpenJDK!

Please share this video with all Java programmers you do know, so everybody will be able to contribute funny hacks and helpful to OpenJDK!

Don’t miss my next conference talks: * September 2021: Java Forum Stuttgart * October 2021: EclipseCon (https://www.eclipsecon.org/2021/sessions/jakarta-restful-web-services-31-and-40-javas-official-rest-api-today-and-tomorrow)

If you like this video, please give it a thumbs up, share it, subscribe to my channel, or become my patreon https://www.patreon.com/mkarg. Thanks! 🙂

Stay safe and… Party On!


by Markus Karg at July 10, 2021 03:00 PM

EclipseCon and Java Forum Stuttgart: I am speaking… about JAX-RS 3.1 and 4.0!

by Markus Karg at July 10, 2021 01:18 PM

As you know, I am a committer to the JAX-RS API and co-author of the Jakarta RESTful Web Services specification. Also I am a contributor to Eclipse Jersey, the former reference implementation of JAX-RS. Due to that, you might be interested to hear that this year, besides JavaLand, I will only speak on two more conferences. So if you like to get the latest news on JAX-RS, the greatest features added to 3.1 (which will be published soon) and planned for 4.0 (which will be published a bit later), how to use them in real world projects with the diverse implementing frameworks like Jersey, CXF, RESTeasy, then you definitively must not miss the following conferences:


by Markus Karg at July 10, 2021 01:18 PM

Payara Server Community 6.2021.1.Alpha1 is now a Certified Jakarta EE 9.1 (Full Profile) Compatible Product

by Debbie Hoffman at July 07, 2021 08:39 AM

Payara has released Payara Server Community 6 (Alpha version) which has passed the Jakarta EE 9.1 TCK on JDK 11. This means Payara Server Community 6.2021.1.Alpha1 is a certified Jakarta EE 9.1 implementation. 


by Debbie Hoffman at July 07, 2021 08:39 AM

Back to the top