Skip to main content

How Caffeine Cache Happened--an airhacks.fm podcast

by admin at February 28, 2021 06:52 PM

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

The #129 airhacks.fm episode with Ben Manes (@benmanes) about:
Java, Bezel,Gin, GWT at Google and how Caffeine Cache happened
is available for download.

by admin at February 28, 2021 06:52 PM

Hashtag Jakarta EE #61

by Ivar Grimstad at February 28, 2021 10:59 AM

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

Tanja and I have been touring JUGs over the last couple of months. So far, we have visited JUGs (virtually) in India, South Africa, Sweden, Serbia, the USA, Poland, Germany, and Spain. And we don’t want to stop there! Please reach out to us if you want us to visit YOUR JUG or Meetup!

It is the end of February already, and the release date for Jakarta EE 9.1 is approaching quickly. A release candidate of the API is available in Maven Central. The current activities are around updating the compatible implementations to pass the TCK on JDK 11.

In order to make it to the proposed release date of March 25, the release review must start at the latest on March 11. That means that there are less than two weeks to get Eclipse GlassFish to pass the TCK on JDK 11.

Beyond Jakarta EE 9.1

Looking ahead, discussions around the next release have started in the Jakarta EE Platform Project. To be able to define the scope of the next release, we need input from the component specifications. Plan reviews are due on April 15, 2021 to be considered as candidates for the next release of Jakarta EE. The plan submitted for review must be possible to implement within 6 months. Which in turn means that we are looking at a Jakarta EE release in October, 2021.


by Ivar Grimstad at February 28, 2021 10:59 AM

Java Performance Shootout: Foreign Linker vs JNI | Modern Java | JDK16 | Head Crashing Informatics 28

by Markus Karg at February 27, 2021 04:00 PM

Hey guys! How’s it going?

The #ForeignLinkerAPI, which is in incubation in #JDK16, was announced to be as fast as, OR EVEN FASTER AS, #JNI (#JavaNativeInterface, the sole OFFICIAL way to call native code from Java). But how looks the realitity? See an ACTUAL performance shootout of the Foreign Linker API vs JNI, AND VERSUS #JNA (#JavaNativeAccess, the DE-FACTO way for invoking native code from #Java). I don’t want to spoil TOO MUCH, but prepare yourself for adopting the new API AS SOON AS YOU CAN…!

In this video, I am using the #JavaMicrobenchmarkHarness (#JMH), see https://github.com/openjdk/jmh.

The source code of the shootout can be found on Gitlab: https://gitlab.com/mkarg/foreignlinkerapi.

If you like this video, please give it a thumbs up, share it, subscribe to my channel, or become my patreon. Thanks!

Stay safe and… Party on!


by Markus Karg at February 27, 2021 04:00 PM

Coffee with Thorben 2020-02-26 – Utility classes that make your life easier

by Thorben Janssen at February 26, 2021 01:00 PM

The post Coffee with Thorben 2020-02-26 – Utility classes that make your life easier appeared first on Thorben Janssen.

Join the chat on YouTube. Utility classes that make your life easier Implementing a persistence layer with Hibernate can require a lot of String references: You’re referencing entities and their attributes by their name. Query hints have very long names that you need to provide as a String. When registering an entity graph, you need […]

The post Coffee with Thorben 2020-02-26 – Utility classes that make your life easier appeared first on Thorben Janssen.


by Thorben Janssen at February 26, 2021 01:00 PM

Payara Platform 2021 Survey

by Debbie Hoffman at February 26, 2021 09:00 AM

The Payara Platform 2021 Survey is underway and we're inviting everyone to answer a few questions about your use of the Payara Platform and ecosystem components. We want to know what you like, what you want to see improved, and we're giving you the opportunity to vote on new features you'd like to see added to the Payara Platform.


by Debbie Hoffman at February 26, 2021 09:00 AM

Building Apps with Helidon & MicroProfile

by admin at February 25, 2021 04:50 PM

Implementing a MicroProfile application with JAX-RS, CDI, Metrics, Health, Fault Tolerance, Config from "Scratch" and on Helidon:

by admin at February 25, 2021 04:50 PM

Keeping Brazil’s Medical Industry Safe with MicroProfile | JakartaOne Livestream 2020

by Cesar Hernandez at February 25, 2021 03:12 PM

Jakarta One 2020, held on December 8th, 2020, gathered industry users and Java communities to share and learn the latest Java enterprise-related technologies. Jakarta EE 9, officially announced in November 2020, that they have created a lot of momentum to keep the conversation going in terms of lessons learned, roadmaps, and best practices. 

Rafael Guimares, and I, had the opportunity to present the session “Keeping Brazil’s Medical Industry Safe with MicroProfile & JakartaEE”. The session addressed the challenges, opportunities, and roadmap to migrating one of Brazil’s medical industry applications from Java EE into Jakarta EE 9, and MicroProfile implementations, towards a Clod-Native Java architecture. 

If you are interested in learning more about Jakarta EE, catch up via its youtube channel and subscribe to its mailing lists here

The post Keeping Brazil’s Medical Industry Safe with MicroProfile | JakartaOne Livestream 2020 appeared first on Tomitribe.


by Cesar Hernandez at February 25, 2021 03:12 PM

Hibernate Performance Tuning Done Right

by Thorben Janssen at February 23, 2021 01:00 PM

The post Hibernate Performance Tuning Done Right appeared first on Thorben Janssen.

Optimizing the performance of your application is a complex and application-specific task. All domain models are different, and often enough, the amount of data managed by them also differs significantly between multiple installations. In addition to that, almost all performance tuning techniques have trade-offs, which don’t make them a great fit for all situations. Because […]

The post Hibernate Performance Tuning Done Right appeared first on Thorben Janssen.


by Thorben Janssen at February 23, 2021 01:00 PM

Micronaut, MicroProfile, Micronaut Data and Helidon

by admin at February 22, 2021 11:09 AM

A code-driven introduction to Micronaut, Micronaut support for MicroProfile, and using Micronaut data with Helidon:

by admin at February 22, 2021 11:09 AM

Panel Discussion: Minimising Security Risks when Developing your Applications

by Jadon Ortlepp (Jadon.Ortlepp@Payara.fish) at February 22, 2021 09:44 AM

United by our passion for Open Source, we are very excited to be teaming up with IBM for another panel event. In this session we will be discussing all things security. How can you minimise security risks when developing your applications?


by Jadon Ortlepp (Jadon.Ortlepp@Payara.fish) at February 22, 2021 09:44 AM

From Competitive Gaming to Java EE API Mavenization--an airhacks.fm podcast

by admin at February 21, 2021 05:28 PM

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

The #128 airhacks.fm episode with Romain Grecourt (@@rgrecourt) about:
competitive gaming, Java, Glassfish, Maven and Java EE API packaging
is available for download.

by admin at February 21, 2021 05:28 PM

Hashtag Jakarta EE #60

by Ivar Grimstad at February 21, 2021 10:59 AM

Welcome to the sixtieth issue of Hashtag Jakarta EE!

As I mentioned last week, the release plan for Jakarta EE 9.1 has been published. The target release date is the end of March 2021. GlassFish 6.1 now compiles and runs on Java SE 11, and the work with getting it to pass the TCK goes on.

The Jakarta EE Platform team has also started to prepare for the next Jakarta EE release after 9.1. At them moment, we are collecting input from the various specification projects to be able to define the content of this release. The deadline for starting plan review for the next Jakarta EE release is April 15, 2021. Make sure to check the minutes for updates. We encourage specification projects to join the Platform calls and give an update on their plans. The details for the platform calls can be found in the Jakarta EE Platform Calendar.

The JUG Leaders Summit and Devnexus took place this week. Devnexus is an awesome conference to visit, and the virtual edition this year was no exception. Let’s just hope that we will be back in Atlanta for next year’s edition.

There is only one more stop planned on the Jakarta EE Virtual Tour, and that is Chicago JUG on February 25. We really enjoy giving these talks, so please reach out if you are interested in hosting us at your JUG or MeetUp.


by Ivar Grimstad at February 21, 2021 10:59 AM

How to deploy SOAP Web Services in Jakarta EE applications

by WildFly Admin (francesco@mastertheboss.com) at February 19, 2021 01:47 PM

This tutorial covers how to build and deploy SOAP based Web services in Jakarta EE applications, also discussing the changes in the Java SE that removed the JAX-WS API from the default Java modules.


by WildFly Admin (francesco@mastertheboss.com) at February 19, 2021 01:47 PM

Coffee with Thorben 2020-02-19 – Enums, Enums, Enums …

by Thorben Janssen at February 19, 2021 01:30 PM

The post Coffee with Thorben 2020-02-19 – Enums, Enums, Enums … appeared first on Thorben Janssen.

Join the chat on YouTube. Enums, Enums, Enums … Enums are the perfect data type, if an attribute can only have one out of a set of predefined values. A typical example is the rating of a product, which can have the values 1, 2, 3, 4 and 5. Using JPA’s default mappings, you can […]

The post Coffee with Thorben 2020-02-19 – Enums, Enums, Enums … appeared first on Thorben Janssen.


by Thorben Janssen at February 19, 2021 01:30 PM

Cleanup JBatch Job Execution Data with New Asadmin Tool Command

by Rudy De Busscher at February 18, 2021 09:49 AM

The JBatch Jakarta EE specification describes the process of how background jobs can be executed on a Jakarta EE compatible runtime. Using the Batch Specification, the runtime can execute some jobs that don't require any user input. Most of the time they are scheduled to execute at a certain moment of the day, but they can be triggered on-demand.


by Rudy De Busscher at February 18, 2021 09:49 AM

What’s next? | The Two Minutes Tuesday 017 | Announcement of Live Show

by Markus Karg at February 16, 2021 10:00 PM

If you ever wanted to know the correct pronounciation of “Eclipse Theia”, stay tuned for this week’s LIVE STREAM on Friday 20:00 CET: My guest in #ToniteWithMe this week is #Gitpod CEO Sven Efftinge from TypeFox!

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 February 16, 2021 10:00 PM

From Monolith to Microservices – Migrating a Persistence Layer

by Thorben Janssen at February 16, 2021 11:58 AM

The post From Monolith to Microservices – Migrating a Persistence Layer appeared first on Thorben Janssen.

Since microservices have become popular, teams are trying to split their monolithic application into a set of small, independent, and highly-scalable microservices. In theory, that often seems like an easy task. You only need to follow the key principles of domain-driven design, identify the bounded contexts in your application, and extract each of them as […]

The post From Monolith to Microservices – Migrating a Persistence Layer appeared first on Thorben Janssen.


by Thorben Janssen at February 16, 2021 11:58 AM

How KumuluzEE Happened--an airhacks.fm podcast

by admin at February 15, 2021 01:15 PM

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

The #127 airhacks.fm episode with Jan Meznarič (jmezna) about:
"Java microservices, drools, jbpm, GlassFish, MicroProfile, Java EE, FatJARs, exploded JARs and layered JARs, cloud native apps, metrics, configuration, blockchain, peer to peer service updates and how KumuluzEE happened"
is available for download.

by admin at February 15, 2021 01:15 PM

Hashtag Jakarta EE #59

by Ivar Grimstad at February 14, 2021 10:59 AM

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

Last week, I wrote a post about Compatible implementations of Jakarta EE specifications and how to get listed on the specification pages. This week, we got LeadPony Joy 2.1.0 listed as a compatible implementation of Jakarta JSON Processing 2.0. Great work!

Jfokus 2021 happened this week. I was involved as a stage host in this year’s edition which was virtual. Next year, I hope to be back in Stockholm for Jfokus 2022.

On Tuesday, the JUG Leaders Summit takes place as a prequel to Devnexus. I look very much forward to meeting many of my fellow JUG leaders at the summit.

The release plan for Jakarta EE 9.1 has been published. The target release date is the end of March 2021. Follow the progress with our GitHub Project Board. While we are working full speed on completing Jakarta EE 9.1, we are also starting to look ahead a little. In the Platform Call this week, we decided to set a deadline for specifications to start their plan reviews in order to be a part of the next release. This deadline is April 15, 2021. Make sure to check the minutes from the platform calls if you are not able to attend a call. I try to publish the minutes as soon as possible after the call. The platform calls happen every Tuesday at 11:00 AM EST and the details can be found in the Jakarta EE Platform Calendar.


by Ivar Grimstad at February 14, 2021 10:59 AM

[LIVESTREAM] Gitpod CEO Sven Efftinge LIVE CHAT | Tonite with me | Java Latenite

by Markus Karg at February 13, 2021 12:14 PM

#ToniteWithMe, LIVE and in color, is Gitpod CEO and Eclipse Theia project lead Sven Efftinge from #TypeFox.

If you love #Gitpod, and ever wanted to know some background history of this great FREE ONLINE IDE service, the difference between Eclipse #Che and #Theia, or just have some other burning questions for Sven, then participate in this LIVE SESSION on Friday at 20:00 CET.

Just type your own questions into the chat while the show runs!

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 February 13, 2021 12:14 PM

Coffee with Thorben 2020-02-12 – JPQL vs Criteria vs Native Queries

by Thorben Janssen at February 12, 2021 01:30 PM

The post Coffee with Thorben 2020-02-12 – JPQL vs Criteria vs Native Queries appeared first on Thorben Janssen.

Join the chat on YouTube. JPQL vs. Criteria vs. Native Queries With JPQL and native SQL queries, Hibernate supports 2 query languages that you can use to search data in your database. In addition to that, there is also JPA’s Criteria API that replaced Hibernate’s proprietary Criteria API. It might seem like there are 3 […]

The post Coffee with Thorben 2020-02-12 – JPQL vs Criteria vs Native Queries appeared first on Thorben Janssen.


by Thorben Janssen at February 12, 2021 01:30 PM

2021: Familiar APIs on Kickass Runtimes--WeAreDevelopers Conference Session

by admin at February 12, 2021 07:53 AM

"Java's JAX-RS, DI, JPA, Metrics, Fault Tolerance, Configuration, cloud-readiness combined with minimal start times, high performance, and Go-like feel. ...and this without a dependency on a particular framework, vendor, or library. In this session, I will implement a next-generation Java backend from scratch and explain the magic on-the-fly. Java SE, reactive APIs, Helidon, Quarkus, GraalVM, MicroProfile, and a bit of Jakarta EE included."


by admin at February 12, 2021 07:53 AM

Jakarta EE Marketing and Branding Committee Levels-Up with New Members

by Tanja Obradovic at February 10, 2021 06:35 PM

The Eclipse Foundation provides our global community of individuals and organizations with a mature, scalable, and business-friendly environment for open source software collaboration and innovation. The Foundation is home to the Jakarta EE, MicroProfile, Eclipse IDE, and over 350 open source projects.

The Eclipse Foundation is an international not-for-profit association supported by over 300 members who value the Foundation’s unique Working Group governance model, open innovation processes, and community-building events. Members include industry leaders who have embraced open source as a key enabler for business strategy.

The newest members of the Eclipse Foundation’s Jakarta EE Marketing and Branding committee are Otavio Santana and Tetiana Fydorenchyk

Otavio is a software engineer focused on Cloud and Java technology. He has experience mainly in persistence polyglot and high-performance applications in finances, social media, and e-commerce. He is a member of both Expert Groups and Expert Leader in several JSRs and JCP executive committee and he is working on several Apache and Eclipse Foundation projects such as Apache Tamaya, MicroProfile, Jakarta EE, where he is leading the first specification at Jakarta EE with Jakarta NoSQL. A JUG leader and global speaker at JavaOne and Devoxx conferences, Otavio has received recognition for his OSS contributions such as the JCP Outstanding Award, Member of the year and innovative JSR, Duke’s Choice Award, and Java Champion Award, to name a few. He is a developer relations engineer at Platform.sh, a platform built especially for agile development and continuous deployment. 


Otavio says, “I’m pleased to be part of the Jakarta EE Marketing and Branding Committee and help in shaping the strategy for our whole community to promote, share, engage with events about technology and bring even more visibility to the progress we’re making. This community is unique and will be a powerful force for the future of technology development because of the collaborative approach that drives us - where everybody can cooperate, help, and share their knowledge to create a community of success around Jakarta EE

Otavio will also contribute Platform.sh's know-how, which has helped thousands of companies in the cloud adoption globally, the goal is to bring even more maturity and credibility with guides, templates, and cases, indeed, in the Java/Jakarta EE side as well. Furthermore, Platform.sh has a community sponsorship program to help the community and the open-source.

Tetiana Fydorenchyk is Vice President of Marketing at Jelastic, a multi-cloud PaaS provider serving developers and hosting companies around the world. The company twice got Duke’s Choice Award for its contribution to Java enhancement and cloud adoption. Tetiana provides executive leadership and management of Jelastic inbound and out-bound marketing activities worldwide, including: corporate, partner/channel, content and product marketing. She produces articles on tech and business topics related to cloud computing, containers, DevOps, microservices, multi-cloud and others. Also, currently Tetiana is a member of Jakarta EE and Microprofile Working Groups.

Tetiana collaborates with leaders in the Java community and cloud customers on a daily basis. She develops blogs, arranges conferences, webinars, user groups meetups and other events designed to support the Java community in its growth and innovation. She has expertise in content creation, online events, public relations and social media, and looks forward to using these skills on behalf of the Jakarta EE project.

Tetiana says, “I’m thrilled to be part of the Jakarta EE Marketing Committee and leverage my network and marketing communications to help this exciting initiative. The main purpose is to accelerate and sustain the growth of the Jakarta EE community by making a valuable practical contribution such as spreading the word, creating content, participating in the events and collaborating on the future plans.”

 

Please stay up-to-date on the latest news and developments from the dynamic Jakarta EE community on Twitter, Facebook and our LinkedIn Group. 


by Tanja Obradovic at February 10, 2021 06:35 PM

What's New in the Payara Platform February Release?

by Debbie Hoffman at February 10, 2021 02:00 PM

This month we release Payara Platform Enterprise 5.25.0 (request here) with 4 improvements and 3 new features, including an update to the Upgrade Tool released last month that gives the ability to restore the domain configuration from the backup with the rollback-server command.

Meanwhile, the Payara Platform Community 5.2021.1 (download here) introduces support for the complete MicroProfile 4.0 specifications, a Hazelcast upgrade providing better support for Amazon AWS, improved stability of HTTP2, and a large number of community contributions. 

Don't miss our release overview virtual event next week, which is now open for registrations on Meetup here. 

Read more below to find out the details.


by Debbie Hoffman at February 10, 2021 02:00 PM

Your Input Needed to Determine Path for Jakarta EE/MicroProfile Alignment

by Reza Rahman at February 09, 2021 11:32 PM

As you are likely aware, Java EE has transitioned to Open Source governance in the Eclipse Foundation as Jakarta EE. MicroProfile has been moving forward as an independent initiative to optimize enterprise Java for microservices architectures. The Cloud Native for Java (CN4J) Alliance has recently been formed to promote better alignment between Jakarta EE and MicroProfile.

One of the key issues to sort out is how Jakarta EE can consume MicroProfile specifications (such as MicroProfile Configuration). There are several alternatives as to how this could be done. The following is a brief analysis of the advantages and disadvantages of each approach, as discussed in the CN4J community thus far. At the end of the analysis, there is a survey you should weigh in on. In addition to choosing the option you believe to be best, it is very valuable to provide comments justifying your preferred alternative. The results of the survey will be shared with the CN4J community and key decision makers.

Jakarta EE and MicroProfile Context

Both Jakarta EE and MicroProfile produce specifications that are intended for and used in cloud native and microservices use cases. In particular, MicroProfile has a specific focus on meeting the needs of cloud native and microservices use cases. MicroProfile also produces comparatively faster platform releases (roughly once a quarter) while the Jakarta EE release cadence is slower (the likely long term target being approximately once a year).

Jakarta EE currently provides relatively strong guarantees for backward compatibility for all specifications. MicroProfile does not currently guarantee backwards compatibility for all specifications, but does produce production-ready specifications that have demonstrated real world adoption. This characteristic enables MicroProfile to focus on innovation in emerging areas while Jakarta EE focuses on more conservative use-cases and stability best suited to the largest enterprises. While MicroProfile specifications have on occasion needed to break backwards compatibility, this decision is made with due care for end users.

MicroProfile specifications depend on one or more Jakarta EE specifications while Jakarta EE does not currently have any dependencies on MicroProfile.

Option A1: Move MicroProfile specifications to Jakarta EE without changing namespaces (so no need to change namespace from org.eclipse.microprofile.* to jakarta.*). Nonetheless, the Maven coordinates for MicroProfile specifications will move to Jakarta. Further evolution will take place under the Jakarta EE working group.

Pro:

  • There is no need for existing MicroProfile users to switch namespaces.
  • This gives MicroProfile due credit going forward for bringing a specification into Jakarta EE.
  • No API duplication between MicroProfile and Jakarta EE.
  • There is only the existing one-way dependency between MicroProfile and Jakarta EE.
  • Some users may wish for greater convergence of MicroProfile into Jakarta EE. This option satisfies this desire to some extent.

Con: 

  • Lack of namespace consistency for Jakarta EE users otherwise not using MicroProfile.
  • Some users may perceive this to mean only Jakarta EE is where production ready specifications are available.
  • It is not immediately obvious to a casual user using both Jakarta EE and MicroProfile in the same application which MicroProfile APIs belong to the MicroProfile working group and which MicroProfile specification belongs to the Jakarta EE working group. This may lead to brand confusion for some users as well as mismatched expectations with regards to characteristics such as backwards compatibility and release cadence.

Option A2: Move MicroProfile specifications to Jakarta EE including the namespace. In this case, the namespaces will be changed from org.eclipse.microprofile.* to jakarta.*. Further evolution will take place under the Jakarta EE working group. No more work will be done in the MicroProfile working group to further evolve a specification once it is moved.

Pro: 

  • Namespace consistency for Jakarta EE users otherwise not using MicroProfile.
  • No API duplication between MicroProfile and Jakarta EE.
  • There is only the existing one-way dependency between MicroProfile and Jakarta EE.
  • It is immediately obvious to a user using both Jakarta EE and MicroProfile in the same application which specifications belong to the MicroProfile working group and which specifications belong to the Jakarta EE working group. This includes expectations of characteristics such as backwards compatibility and release cadence.
  • Some users may wish for greater convergence of MicroProfile into Jakarta EE. This option satisfies this desire to some extent. This may include a possible preference for the jakarta.* namespace, which is more generic – as opposed to the org.eclipse.microprofile namespace, which may imply a focus on microservices.

Con: 

  • Existing MicroProfile users will need to switch namespaces in order to take advantage of newer versions of moved specifications. Similarly, implementers will need to put effort towards migration, including potentially maintaining two separate work streams at least in the short term.
  • Some users may perceive this to mean only Jakarta EE is where production ready specifications are available.

Option B: Reference MicroProfile specifications in Jakarta EE and not move MicroProfile specifications. Jakarta EE will not duplicate any referenced specifications and MicroProfile specifications will only be evolved under the MicroProfile working group.

Pro:

  • No API duplication between MicroProfile and Jakarta EE.
  • No migration effort is needed for any users or implementors, while Jakarta EE can still use the specification.
  • Some users may wish for MicroProfile and Jakarta EE to remain as separate as possible. This option satisfies this desire to some extent.

Con:

  • Lack of namespace consistency for Jakarta EE users otherwise not using MicroProfile.
  • It is not immediately obvious to a user using both Jakarta EE and MicroProfile in the same application which MicroProfile specifications are referenced by Jakarta EE and which are not (and as a result have different expectations with regards to characteristics such as backwards compatibility).
  • The referenced MicroProfile specification may wish to break backwards compatibility at some point in its evolution while Jakarta EE does not. Additional efforts will need to be made to address such mismatches.
  • This introduces a circular dependency between Jakarta EE and MicroProfile. This can make matching release cadences, dependencies, features and collaboration more difficult, including potentially unexpected challenges for end users. The following is one possible example illustrating version dependency mismatches: MicroProfile m2 aligns with Jakarta EE j1, while Jakarta EE j1 aligns with MicroProfile m1. MicroProfile Configuration c2 is included in MicroProfile m2. Jakarta Persistence p1 relies on MicroProfile Configuration c1 in MicroProfile m1 because Jakarta EE j1 was released before MicroProfile m2. An application wants to use both Jakarta EE j1 and MicroProfile m2 together. Which MicroProfile Configuration version will the application end up with? If MicroProfile Configuration c2 in MicroProfile m2 was loaded, Jakarta Persistence p1 may not work with MicroProfile m2 as expected when tested and released via the Jakarta EE j1 compatibility test kit/TCK).
  • If Jakarta EE integration specific changes are required in MicroProfile specifications, it will require coordination across working groups in a timely fashion with regards to dependencies, release cadence and features.

Option C: Create Jakarta EE versions of MicroProfile specifications. In this case, Jakarta EE and MicroProfile will develop similar features in parallel.

Pro:

  • MicroProfile and Jakarta EE can independently evolve features as they best see fit.
  • End users can mix and match MicroProfile and Jakarta EE as they best see fit. Implementations may do the same.

Con: 

  • Duplication of effort and resources across Jakarta EE and MicroProfile. The duplication of effort will likely also extend to implementations.
  • End users will need to choose between equivalent features in Jakarta EE and MicroProfile.
  • MicroProfile and Jakarta EE will very likely be seen as directly competing efforts, leading to further confusion.

Voice Your Opinion!

Each of the alignment approaches have advantages and disadvantages. While decision makers might guess what the right tradeoffs for end users and the ecosystem are, you have a role in providing feedback on what works best for you. Please take a moment to fill out this short survey and provide your feedback now. The results of the survey will be shared with decision makers. You should also continue to stay engaged by subscribing to the CN4J Alliance mailing list.


by Reza Rahman at February 09, 2021 11:32 PM

Hibernate Query Spaces – Optimizing Flush and Cache Operations

by Thorben Janssen at February 09, 2021 01:00 PM

The post Hibernate Query Spaces – Optimizing Flush and Cache Operations appeared first on Thorben Janssen.

Hibernate needs to ensure that all tables referenced in a query are up to date before executing the query. That means it has to flush all pending changes for these tables before it runs the query. Otherwise, the database would process the query on an outdated data set and return wrong results. Hibernate not only […]

The post Hibernate Query Spaces – Optimizing Flush and Cache Operations appeared first on Thorben Janssen.


by Thorben Janssen at February 09, 2021 01:00 PM

Deploy Friday: E41 Empowering business automation with Quarkus

by otaviojava at February 09, 2021 05:00 AM

Business automation is a practice that brings technology-enabled automation of complex business processes and decision management. It allows the usage of well-established standards, adopted by business users, within the best breed of technologies to streamline a business for simplicity.  These kinds of technologies have been used across different industries for more than ten years now: […]

by otaviojava at February 09, 2021 05:00 AM

Webinar: Architecting and delivering Java applications in the cloud era

by otaviojava at February 08, 2021 03:00 PM

Live WebinarDate: February 8thTime: 5:00 – 6:30 PM GMT Nowadays, the best company is the one that delivers value quicker to its customers. They seek to spend less, and in consequence, they end up searching for cloud solutions. On the technical side, we have Java, which is the most mature and popular language of the […]

by otaviojava at February 08, 2021 03:00 PM

Hashtag Jakarta EE #58

by Ivar Grimstad at February 07, 2021 10:59 AM

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

This was the weekend of Fosdem. I had a Jakarta EE talk on Saturday in the Foojay devroom. The talk was recorded and I was looking forward to wearing my new, nice T-shirt on the video during the Q&A. A last-minute decision by the organizers turned this into a chat Q&A, which turned out to work very well. The Fosdem audience is awesome!

I also visited the Eclipse Foundation stand. Do come by if you happen to read this before the conference is over. You can win a nice Eclipse Foundation hoodie!

Jfokus 2021 is happening on Tuesday, February 9. I will be hosting Track D together with Grace Jansen. There will be talks by Paul Bakker, Jonathan Giles, and Dmitry Alexsandrov during our time as hosts. I encourage you to visit us, and of course, do check out the other tracks as well.

For a recap of what happened in the Jakarta EE working group, during 2020, check out What a Difference a Year Makes! – Jakarta EE 2020 review by Tanja Obradović.


by Ivar Grimstad at February 07, 2021 10:59 AM

Foreign Linker API: Java native access without C | Modern Java | JDK16 | Head Crashing Informatics 27

by Markus Karg at February 06, 2021 04:00 PM

Hey guys! How’s it going?

The #ForeignLinkerAPI of #JDK16 allows to invoke native code, typically DLLs or shared objects written in the C language, without neither a #JNI wrapper written in C, nor a third party library like #JNA.

Due to its cross-platform nature, Java never was a “good citizen” on any operating system. Besides the UI, which never really looked “native”, you mostly noticed this when it comes to calling native binary code. While you could write special libraries in C that fulfils the JNI contract, this is not what you actually wanted: Calling already existing THIRD PARTY libraries, like the Windows API for example. JNA and other libraries improved this, but were not as fast as JNI on one hand, and were not part of the official platform, so just replaced custom static glue code by third-party dynamic glue code. Still at runtime some JNI mumbo jumbo had to go on to copy data between the Java heap and the native heap, which is rather slow. And the worst thing is, JNA was only available for a small set of platforms, WAY less than the lots of platforms Java runs on!

With JDK 16, the Foreign Linker API (and its twin, the Foreign Memory Access API) enters the stage, and this will be a real game changer! While it still is in incubation, which mean it will definitively change over the next few JDKs before it will be stable, it already shows its powers: It is deeply built into the Java runtime itself, and it natively links the loaded native binary code with the Java runtime itself. Just like keeping the Java interface, but providing the actual native code as the implementation. Due to that, it is at least as fast as JNI (possibly fast as potentially less data is moved or converted between the OS memory and the JVM memory), can load ANY third party code, hence does not need a custom DLL to be written by you in C, nor does it need a third party glue code like JNA. Data binding works directly with the native heap using the new Foreign Memory Access API, so it prevents the expensive Java code mirroring unless actually needed. As the whole glue code is written in Java, and both APIs are part of the JRE, this API works on ALL platforms without any third party stuff or glue code in C!

Ain’t that f*ing great?! Guys, I waited for this since decades! Yes, JNA was ok, and I even contributed to it. But the foreign linker API and foreign memory access APIs is what we all REALLY want. It just feels so good! Try it out AT ONCE!

If you like this video, please give it a thumbs up, share it, subscribe to my channel, or become my patreon. Thanks!

Stay safe and… Party on!


by Markus Karg at February 06, 2021 04:00 PM

Compatible Implementations

by Ivar Grimstad at February 05, 2021 01:05 PM

As you probably are aware, the concept of a single reference implementation (RI) to prove that a specification is implementable does not exist in Jakarta EE. The Jakarta EE Specification Process (JESP) mandates at least one compatible implementation (CI), but preferably as many as possible.

Take a look at Arjan Tijms‘ list of Implementation components used by Jakarta EE servers for a more complete list of compatible implementations and which Jakarta EE compatible product they are included in.

An unintentionally hidden “secret” is how easy it is to get your compatible implementation listed on a specification page. I hope this blog post will clarify the process and make it a little less “hidden“. We are looking into how we can simplify this even further by automating some of the steps, but this is how it looks like right now.

TLDR;

Step 1. Pass the TCK and publish the results
Step 2: File a Certification Request
Step 3. Submit a PR to get listed (we are looking at ways to automate this step)

Step 1. Pass the TCK and publish the results

The prerequisite is that you pass the TCK for the specification you implement. The TCK may be downloaded from the specification page and is specific to a version of the specification.

The next step is to publish the TCK results. This is the heart of self-certification. You run the TCK and publish the results yourself. This means that you don’t have to rely on others to run the tests for you. And by publishing the results, you take responsibility for the correctness of the results.

TCK Results

For some examples of how to publish the TCK results, check out the results for Eclipse Yasson 2.0.0 (implements Jakarta JSON Binding 2.0), Weld 4.0.0 (implements Jakarta CDI 3.0), and Eclipse Krazo 2.0.0 (implements Jakarta MVC 2.0).

After publishing the TCK results, the only thing you need to do is to send an email to tck@eclipse.org to make the Eclipse Foundation aware that you have passed the TCK.

Step 2. File Certification Request

In order to get listed on a specification’s page under on jakarta.ee/specifications as a compatible implementation, the next thing you need to do is to file a certification request in the specification’s issue tracker.

Certification

A certification request needs to follow a specific template to provide the necessary information. I have added the source for the template here:

- [ ] Organization Name ("Organization") and, if applicable, URL:
  // Add here
- [ ] Product Name, Version and download URL (if applicable):
  // Add here
- [ ] Specification Name, Version and download URL:
   // Add here
- [ ] TCK Version, digital SHA-256 fingerprint and download URL:
  // Add here
- [ ] Public URL of TCK Results Summary:
  // Add here
- [ ] Any Additional Specification Certification Requirements:
  // Add here
- [ ] Java runtime used to run the implementation:
  // Add here
- [ ] Summary of the information for the certification environment, operating system, cloud, ...:
  // Add here
- [ ] By checking this box I acknowledge that the Organization I represent accepts the terms of the [EFTL](https://www.eclipse.org/legal/tck.php).
- [ ] By checking this box I attest that all TCK requirements have been met, including any compatibility rules.

When a specification team receives a certification request, they will add the accepted label after verifying the contents of the request. See the certification requests for Eclipse Yasson 2.0.0, Weld 4.0.0, and Eclipse Krazo 2.0.0 for examples of certification requests.

Step 3. Submit a PR to get listed

When the certification request has been approved, the last step is to submit a Pull Request to the specifications repository where you add your implementation to the list of compatible implementations for the specification.

Pull Request

The file you should update is the _index.md file located in the version sub-directory of the specification you are implementing. For example, to add a new compatible implementation called OpenKangaroo 1.0.0 to the Jakarta Wombat specification, I would add the line marked with (+) below:

  # Compatible Implementations 

  * [Little Wallaby 2.0](https://wallaby.org/download/2.0)
+ * [OpenKangaroo 1.0.0](https://open.roo/downloads/roo-1.0.0)

Summary

That’s it! We are looking into automating as much as possible of this process to make it as easy as possible while maintaining the necessary control mechanisms. Until we get there, the three steps described in this post are what you need to do.

Step 1. Pass the TCK and publish the results
Step 2: File a Certification Request
Step 3. Submit a PR to get listed (we are looking at ways to automate this step)

Please don’t hesitate to reach out to us on one of our mailing lists if you have questions.


by Ivar Grimstad at February 05, 2021 01:05 PM

Coffee with Thorben 2020-02-05 – Auditing with Hibernate Envers

by Thorben Janssen at February 05, 2021 10:45 AM

The post Coffee with Thorben 2020-02-05 – Auditing with Hibernate Envers appeared first on Thorben Janssen.

Join the chat on YouTube. Auditing with Hibernate Envers In today’s stream, we will talk about another often requested topic: Writing and managing an audit log with Hibernate Envers. I will show you how to set up Hibernate Envers for your project and how you can use its query APIs to extract information from your […]

The post Coffee with Thorben 2020-02-05 – Auditing with Hibernate Envers appeared first on Thorben Janssen.


by Thorben Janssen at February 05, 2021 10:45 AM

JDBC Connection and Dialect Configuration in Hibernate

by Thorben Janssen at February 02, 2021 03:35 PM

The post JDBC Connection and Dialect Configuration in Hibernate appeared first on Thorben Janssen.

To connect your persistence layer to your database, you need to configure a data source or provide the JDBC connection driver, URL, and login information to Hibernate directly. In addition to that, Hibernate needs to know the database-specific dialect it shall use to generate the SQL statements. Hibernate can detect the dialect based on the […]

The post JDBC Connection and Dialect Configuration in Hibernate appeared first on Thorben Janssen.


by Thorben Janssen at February 02, 2021 03:35 PM

Jakarta EE Community Update for January 2021

by Tanja Obradovic at February 01, 2021 09:46 PM

The start of the year is strong for Jakarta EE. New members, new plans for the next release, new initiatives and new Jakarta EE talks and sessions. Please read on.

 

The Jakarta EE community and Working Group is growing!

A new Enterprise member joined the Jakarta EE working group. We are very excited to welcome Shandong Cvicse Middleware Co., Ltd to the working group. 

Shandong Cvicse Middleware Co.,Ltd was established in 2002 and is a backbone enterprise of basic software middleware in China. The company's main business is basic software middleware product development, integration and technical services. The main products include application servers, unified supervision platforms, PaaS platforms, etc. For more than ten years, the core products provided to our customers follow the Java EE international mainstream technical standards. Therefore, we have joined the Jakarta EE working group and hope to have more exchanges, lessons learnt, better understanding and participation in the development and construction of Jakarta EE Products to provide customers with a better Middleware Application System.

 

Jakarta EE 9.1 release

The focus of the first quarter is work related to Jakarta EE 9.1 Release. Kevin Sutter, IBM is leading the effort. The primary goal of the release is to provide support for Java SE 11 and to deliver it as soon as possible. We do not expect any API changes in this release.

Here is the Jakarta EE 9.1 Release Plan document and the corresponding github PR

 

Marketing and Branding Committee elections 

We had interest from the community to fill vacant seats in the Marketing and Branding Committee.The openings were available for

  •  Elected Committer Member Representative

  •  Elected Participant Member Representative 

We are extremely happy to announce that we filled those seats and we now have 

  • Otavio Santana, Platform.sh as Elected Committer Member Representative

As well as 

  • Tetiana Fydorenchyk, Jelastic  as Elected Participant Member Representative 

The Jakarta EE Marketing and Branding Committee is looking forward to this collaboration and contributions of Tetiana and Otavio.

 

2021Jakarta EE Update call

We had our first Jakarta EE Update call of the 2021 where it was presented. You can watch the recording of the call on our Jakarta EE Youtube Channel

Here is the call agenda 

  • Jakarta EE 2021 Program Plan and Budget - Will Lyons, Oracle 

  • Plans for Jakarta EE 9.1 release - Kevin Sutter, IBM

  • Update from the Eclipse Foundation - Ivar Grimstad, Karen McNaughton, Tanja Obradovic 

 

Book your 2021 Virtual Tour 

We had a great interest in 2020for this tour, and we started strong in 2021 as well! Jakarta EE Developer Advocate, Ivar Grimstad, and I (Tanja Obradovic) are continuing with Jakarta EE Virtual Tour, providing one-hour talks on Jakarta EE 9 and beyond to Java communities.

January 2021 is already quite busy with the scheduled sessions, but don’t hesitate to contact me (tanja.obradovic@eclipse-foundation.org) if you’d like us to present at your Java User Group (JUG) or Meetup event throughout 2021.

 

 

Stay Connected With the Jakarta EE Community

The Jakarta EE community is very active and there are a number of channels to help you stay up to date with all of the latest and greatest news and information. Subscribe to your preferred channels today:

·  Social media: Twitter, Facebook, LinkedIn Group

·  Mailing lists: jakarta.ee-community@eclipse.org, jakarta.ee-wg@eclipse.org, project mailing lists, slack workspace

·  Newsletters, blogs, and emails: Eclipse newsletter, Jakarta EE blogs, Hashtag Jakarta EE

·  Meetings: Jakarta Tech Talks, Jakarta EE Update, Jakarta Town Hall, and Eclipse Foundation events and conferences

You can find the complete list of channels here.

To help shape the future of open source, cloud native Java, get involved in the Jakarta EE Working Group.

To learn more about Jakarta EE-related plans and check the date for the next Jakarta Tech Talk, be sure to bookmark the Jakarta EE Community Calendar.

 


by Tanja Obradovic at February 01, 2021 09:46 PM

What a Difference a Year Makes! - Jakarta EE 2020 review

by Tanja Obradovic at February 01, 2021 09:34 PM

It has been a great pleasure to witness steady progress in Jakarta EE in the year 2020. This was a very challenging year around the globe, but even with the impact of the pandemic,  we continued to make great strides forward in the Jakarta EE community. Before we look ahead let’s recap our  2020 achievements.

Jakarta EE Working Group Members

We are so pleased  that even during these difficult  times our membership is still growing! We ended the year with eighteen members. In 2020, we welcomed:

  • Enterprise member: Primeton Information Technologies, Inc

  • Participant member: Kingdee Apusic Cloud Computing Co.,Ltd, TmaxSoft Co., Ltd, ManageCat LLC, Jelastic, Inc and Beijing Thunisoft Information Technology Co., Ltd

 

Jakarta EE Compatible Products 

Our Compatible Product list for Jakarta EE 8 release is continuously growing as well. Here is the growth we saw in Jakarta EE 8 list of compatible products (11 vendors with 11 Full Profile Compatible Products and Web Profile Compatible Products) https://jakarta.ee/release/8/ 

  • JESUS 8.5 (TmaxSoft Co., Ltd)

  • JBoss Enterprise Application Platform 7.3.0 (Red Hat)

  • Primeton AppServer 7.0 (Primeton)

  • Apusic AAS 10.1(Kingdee Apusic)

  • Fujitsu Software Enterprise Application Platform v1.0 (Fujitsu)

  • IBM WebSphere Liberty - IBM

  • Thunisoft Application Server - Beijing Huayu Information Technology Co., Ltd 

 All together 11 vendors with 11 Full Profile Compatible Products and Web Profile Compatible Products. Please visit https://jakarta.ee/compatibility/#tab-8 

 

2020 Releases

Here are some numbers to illustrate the work that has been done on the specification projects for the last release.

Jakarta EE 9 specification projects commits since 2019-9-10.

  • Lines Of Code: 4877853

  • Projects: 29

  • Commits: 2655

  • Authors: 149

Many would agree that pictures are worth a thousand words, so here they are! 

Jakarta EE Specification projects Company Commits in 2020Q4

Individual and organizations other then our member supporting organisations are taking the lead in Jakarta EE specification projects. This is a great indication of healthy interst from java enterprose community in Jakarta EE.

Eclipse GlassFish Project in 2020Q4

Jakarta EE TCK Project in 2020Q4

Jakarta EE Platform in 2020Q4

 

Celebrating our contributors

With the release out of the doors, we need to pause and celebrate all that have made it possible! With the Jakarta EE Working Group from and the strong leadership of 

  • Kevin Sutter, IBM on Jakarta EE Platform Project

  • Steve Millige, Payara on Eclipse GlassFish 

  • Scott Marlow, Red Hat on Jakarta EE TCK

We have a list of our top contributors! Please take a moment and recognize all they accomplished. Thank You All from my side.

 

Our virtual conferences and events

In a year like this demand for the virtual event has grown, and we quickly reacted ad provided what the community needed.

JakartaOne Livestrearn - Japan 

Virtual event in Japanese 

February 26th, 2020

10 speakers

  • 2 keynotes

  • 5 vendor talks

  • 3 technical talks

Attendees

  • 213 registered

  • 159 attended live and 89 replays

JakartaOne Livestrearn CN4J

Event organized in response to the COVID-19 (CN4J Day @ KubeCon)

May 12th, 2020

Nine speakers

  • Two keynotes

  • Seven technical talks

Attendees

  • 555 registered

  • 300 attended live and 242 replayed the event

Event organized to celebrate the Jakarta EE 9 Milestone release

Eight speakers

  • Three hosts from the Eclipse Foundation

  • Five member talks

Attendees

  • 194 registered

  • 117 attended live and 107 replayed the event

JakartaOne Livestrearn - Brazil

Event organized in Portugese 

August 29th, 2020

  • Twelve speakers 

  • One keynote

  • Five technical talks

Attendees

  • 336 registered

  • 182 attended live and 142 replayed the event

JakartaOne Livestream - Spanish

Event organized in Spanish - 8 hours long 

October 12th, 2020

  • Twenty-four speakers 

    • Three keynotes

    • Four Vendor talks

    • Ten technical talks

    • One Round table

Attendees

  • 516 registered

  • 336 attended live, 195 replayed the event, and 156 watched on YouTube

JakartaOne Livestream 2020

Annual English Event - 12 hours long

December 8th, 2020

  • Twenty-seven speakers 

    • One keynote

    • Five vendor talks

    • Ten technical talks

    • Ten Studio Jakarta EE sessions

    • One Lightning talk

Attendees

  • 1021 registered

  • 544 attended live, 237 replayed the event, and 490 watched on YouTube

Conferences with Jakarta EE Talks

  • FOSDEM 20 - Feb 1-2

  • Devnexus 20 - Feb 19-21

  • IBM Think - May 5-7

  • Java Day Istanbul Sept 10-12

  • J4K - Oct 13-14

  • JCON - Oct 27-30

  • Java2Days - Dec 22

Community outreach programs

New community outreach programs were introduced

We also continued with existing established and successful initiatives 

Community Involvement

Our mailing list subscriptions grew as well. This clearly shows industry and developers’ interest in the Jakarta EE. I would expect with the new base Jakarta EE 9 Platform everyone is eager and ready for the innovation of the Jakarta EE specifications.

In conclusion, 2020 was a great year for Jakarta EE! With the move to jakarta.x namespace we now have a platform that is ready for the future, and is welcoming all java enterprise enthusiasts to join and take Jakarta EE to the next level!


by Tanja Obradovic at February 01, 2021 09:34 PM

Hashtag Jakarta EE #57

by Ivar Grimstad at January 31, 2021 10:59 AM

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

I wanted to take the opportunity to show you that I don’t always sit by my desk writing blog posts and attending virtual events. I do other stuff as well! At the end of this week, we got some days of sub-zero temperatures here in Sweden. That means that the lakes freeze and skating season is on for a couple of days until the warmer weather is back again.

Don’t worry, it’s not open water behind me… It’s just how the water freezes occasionally. But it looks pretty cool, though.

Talking about cool stuff, make sure to revisit the Studio Jakarta EE LIVE session I had with Emily this week. In the video, we talk about the new MicroProfile 4.0 release. Emily gives a thorough walk-through of all the changes as well as showing it in practice.

Next weekend is FOSDEM weekend! I have one Jakarta EE talk in the Foojay track. Join me on Saturday at 14:40 CET. The talk is recorded, but I will be online during the talk and will also be available for 10 minutes Q&A after the playback of the talk.

The Eclipse Foundation has a virtual stand where all working groups are presented. Stop by the stand for a chat with us there and for a chance to win a hoodie!


by Ivar Grimstad at January 31, 2021 10:59 AM

Coffee with Thorben 2020-01-29 – Soft Deletes & Bi-directional Association

by Thorben Janssen at January 29, 2021 01:30 PM

The post Coffee with Thorben 2020-01-29 – Soft Deletes & Bi-directional Association appeared first on Thorben Janssen.

Subscribe on YouTube to not miss any video. Soft Deletes During last week’s stream, I was asked to show how to implement soft deletes with Hibernate. So, that will be the topic of this week’s stream. In addition to the stream, you might find this article useful: How to implement a soft delete with Hibernate. […]

The post Coffee with Thorben 2020-01-29 – Soft Deletes & Bi-directional Association appeared first on Thorben Janssen.


by Thorben Janssen at January 29, 2021 01:30 PM

Pattern matching for “instanceof” in JDK16 | The Two Minutes Tuesday 016

by Markus Karg at January 25, 2021 10:00 PM

The new pattern matching enhancement for the instanceof operator in #Java16 spares you a lot of typing, and makes the code more concise and much easier to understand!

#JDK16 is stable and will be released in March. Time to look into the new PATTERN MATCHING functionality that it brings for the instanceof operator. Turn five complex code lines into a simple single code line, and spare a lot of typing and potential failures! I will show you in this video how amazing modern #Java source code looks like when using this new syntax!

CU!


by Markus Karg at January 25, 2021 10:00 PM

Hashtag Jakarta EE #56

by Ivar Grimstad at January 24, 2021 10:59 AM

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

It is time for a new edition of Studio Jakarta EE LIVE! This time I have Emily Jiang from IBM with me in the studio. We will talk about MicroProfile 4.0 and I am pretty sure that Emily will show some cool demos as well.

Check out microprofile.io for details about MicroProfile 4.0 and MicroProfile in general. And of course, make sure to tune in to Studio Jakarta EE LIVE: MicroProfile 4.0 on Thursday!

MicroProfile 4.0 contains updates to all the specifications. It is based on the Jakarta EE 8 versions of the four specifications that form the foundation of MicroProfile. This means that it is still on the javax.* namespace.

How difficult the migration from the javax.* to the jakarta.* namespace is for your particular use case depends on the complexity of your application. The focus has mainly been on the Java package names, but there are some other areas that may require some effort as well. Check out my Migration Guide for an example of how to migrate an application that touches most of the areas.

Please reach out to me if you discover areas that I have missed in the guide. I will be happy to update it!

There is only one more stop planned on the Jakarta EE Virtual Tour. We really enjoy giving these talks, so please reach out if you are interested in hosting us at your JUG or MeetUp.


by Ivar Grimstad at January 24, 2021 10:59 AM

Spare keystrokes with the record keyword | Modern Java | JDK 16 | Head Crashing Informatics 26

by Markus Karg at January 23, 2021 04:00 PM

Hey guys! How’s it going?

The record keyword is ready for production use in JDK 16, which officially will be here mid March. Spare lots of keystrokes and get rid of code generators and IDE magic with this new keyword!

In addition to spare typing, your Java source code also is getting much easier to maintain and to understand, as it is so concise and fully integrated into the compiler and the runtime. While, besides of shorter source code, there is no measurable speed gain or reduced binary footprint currently, I could imagine that in future the runtime could further optimize records, as it knows that records are definitively immutable and non-extensible.

Maybe project Valhalla will then treat them as primary data types, as they already are best suited for passing around pure values — so your code would run in double speed consuming half the memory?

Secure a headstart: Use Java 16 NOW!

Project Valhalla: https://cr.openjdk.java.net/~briangoetz/valhalla/sov/01-background.html

Valhalla change log: https://github.com/openjdk/valhalla/commits/lworld

Stay safe and… Party on!


by Markus Karg at January 23, 2021 04:00 PM

Coffee with Thorben 2020-01-22 – JSON Mappings & Polymorphic Associations

by Thorben Janssen at January 22, 2021 01:12 PM

The post Coffee with Thorben 2020-01-22 – JSON Mappings & Polymorphic Associations appeared first on Thorben Janssen.

Subscribe on YouTube to not miss any video. JSON Mappings The mapping of associations seems easy but there are several pitfalls you should avoid. Links mentioned in the video: How to use PostgreSQL’s JSONB data type with Hibernate PostgreSQL documentation: JSON Types PostgreSQL documentation: JSON Functions and Operators If you want to learn more about […]

The post Coffee with Thorben 2020-01-22 – JSON Mappings & Polymorphic Associations appeared first on Thorben Janssen.


by Thorben Janssen at January 22, 2021 01:12 PM

Migration Guide

by Ivar Grimstad at January 22, 2021 10:17 AM

In my post Migrate to Jakarta EE 9 last year, I wrote about how to migrate your application from the javax.* to the jakarta.* namespace. I think it is time to revisit this topic and outline the steps involved.

In the recent versions of the Jakarta EE 9 and Beyond talk, I have included a slide that lists the steps needed for the migration. Note that all the steps does not necessarily apply to your application.

I strongly recommend that you use the help provided by your IDE to fix the Java package names. If you choose to go the brute force way and replace all occurrences of javax. with jakarta., you will most likely experience some issues. This is important! There are still classes in Java SE that are in the javax.* namespace. These are not affected by the Jakarta EE namespace migration, but stay as they are. Some examples are:

javax.sql.*
javax.transaction.xa.*
javax.xml.*
javax.naming.*
javax.swing.*

These are just some of the examples, so be careful with the global search-and-replace!

Take a look at the Complete Duke application for a full step-by-step example of how to migrate from Jakarta EE 8 to Jakarta EE 9. I hope it helps!


by Ivar Grimstad at January 22, 2021 10:17 AM

Hibernate Reactive – Getting Started Guide

by Thorben Janssen at January 20, 2021 02:25 PM

The post Hibernate Reactive – Getting Started Guide appeared first on Thorben Janssen.

If you want to implement a reactive application, you not only need to adapt your way of thinking and switch to reactive libraries for your business layer. You also need to access your database in a reactive way. One way to do that is to use Hibernate Reactive. It’s based on Vert.X and implements the […]

The post Hibernate Reactive – Getting Started Guide appeared first on Thorben Janssen.


by Thorben Janssen at January 20, 2021 02:25 PM

Hashtag Jakarta EE #55

by Ivar Grimstad at January 17, 2021 10:59 AM

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

We are two weeks into the new year already, and I want to remind the specification teams that about the deadline for submitting a plan review in order to be a candidate for inclusion in the Jakarta EE 9.1 release. The deadline is January 31 as the timeline below shows.

The Jakarta EE Platform team are having weekly calls where various topics related to the platform specification are discussed. Please, do join this call if you are interested in participating in shaping the platform. Details for how to join can be found in the Jakarta EE Platform Calendar.

Barcelona JUG is the next stop on our Jakarta EE Virtual Tour. Join here! We really enjoy giving these talks, so please reach out if you are interested in hosting us at your JUG or MeetUp.

The first Jakarta EE Update Call of 2021 will happen on January 21! The topics we will cover in this call are the program plan and budget, the release plan for Jakarta EE 9.1 as well as upcoming events, programs and marketing campaigns. And, of course, there will be an opportunity to get your questions asked and answered.

Visit the Community Calendar to find the details about how to join the call.


by Ivar Grimstad at January 17, 2021 10:59 AM

Coffee with Thorben 2020-01-15 – Association Pitfalls & Enum Mappings

by Thorben Janssen at January 15, 2021 01:15 PM

The post Coffee with Thorben 2020-01-15 – Association Pitfalls & Enum Mappings appeared first on Thorben Janssen.

Subscribe on YouTube to not miss any video. Association Mapping Pitfalls The mapping of associations seems easy but there are several pitfalls you should avoid. Articles mentioned in the video: Ultimate Guide – Association Mappings with JPA and Hibernate Entity Mappings: Introduction to JPA FetchTypes Why you should avoid CascadeType.REMOVE for to-many associations and what […]

The post Coffee with Thorben 2020-01-15 – Association Pitfalls & Enum Mappings appeared first on Thorben Janssen.


by Thorben Janssen at January 15, 2021 01:15 PM

New Game New Luck | The Two Minutes Tuesday 015

by Markus Karg at January 12, 2021 10:00 PM

Sitting in a f*ing cold studio I wonder what video you would love me to record next!

The year 2021 is here, and I am bringing modern and cloud-native Java to some of my favorite open source projects: Speeding up Maven by using Multi-Release JARs with support for Java 9 and 10’s improved NIO API, quickly booting and small-footprint REST microservices with standalone JAX-RS 3.1 in Kubernetes, Java 11 support in Jakarta EE 9.1, and much more!

But where to start…? What videos do YOU like me to post next? Write your favorite video topics in the comments section belows this video!

CU!


by Markus Karg at January 12, 2021 10:00 PM

Community Projects & Contributors Take on Jakarta EE 9

by Chris Walker at January 12, 2021 04:22 PM

With the recent release of JakartaEE9, the future for Java has never been brighter. In addition to headline projects moving forward into the new jakarta.* namespace, there has been a tremendous amount of work done throughout the community to stay

by Chris Walker at January 12, 2021 04:22 PM

Hashtag Jakarta EE #54

by Ivar Grimstad at January 10, 2021 10:59 AM

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

The main goal of Jakarta EE 9.1 is to support the Java SE 11 runtime. The APIs will still be compiled to Java SE 8 level in order to be usable to both Java SE 8 and Java SE 11. That means that there will not be need for any new releases for the individual specifications unless the specification teams have changes they wish to push forward. The absolute deadline for such plans to be put forward is January 31, 2021. See the timeline below.

Note that, it is up to the platform project to decide if any new versions should be included in the Jakarta EE 9.1 release even if a plan review is submitted within this deadline.

The Jakarta Contexts and Dependency Injection project continues with weekly calls with the goal to define a CDI Lite specification. Follow the discussions on the CDI Developer Discussions mailing list.

The Jakarta EE Virtual Tour continues in 2021. The ones we have planned so far are Silesia JUG (Jan 13), JUG Darmstadt (Jan 13), Barcelona JUG (Jan 20), and Chicago JUG (Feb 25). Please reach out if you are interested in hosting us at your JUG or MeetUp.

The jChampions Conference is starting next week. I will be a moderator for at least one of the sessions. Check out the schedule.


by Ivar Grimstad at January 10, 2021 10:59 AM

Java 15 vs Java 8 | Modern Java Features | Head Crashing Informatics 25

by Markus Karg at January 09, 2021 04:00 PM

Hey guys! How’s it going?

Backporting an application from Java 15 to Java 8 to convince you how much better coding in modern Java is!

Java 15’s modern language features and API enhancements makes coding so much better!

In this video I am migrating a JAX-RS application from Java 15 back to Java 8 to demonstrate how great the modern code is like, compared to the functionally identical code in the ancient pre-Java-9 world. You will see the difference in lines of codes spared due to using the var keyword, switch expressions and the Map.of() factory method – just THREE features out of a whole bunch of improvements! In the end, Java 8 was not just slower in its execution, it also forced you to write much more code, less comprehensible code, was more error-prone, and enforced complex construction, compared to Java 15. In addition, you had to scroll around a lot as you had to put some code into extra methods. Also the old-school code had much more potential bugs and even some were not even detectable at compile time!

Adopt modern Java NOW and start to use all the new features to get better, faster, more concise, more readable, and more bug-free Java code in less time!

You even can do that in existing libraries thanks to multi-release JARs, like Maven currently is adopting it, or on Jakarta EE 9.1 which officially supports Java 11 and will be released in few weels! Chances are good that your application server ALREADY allows modern Java, as e. g. Eclipse Jersey is supporting this already since several releases (this video actually proofs this)! And your favorite IDE definitively DOES support Java 15 already!

So there is no more excuse to wait any longer: Start using Java 15 NOW!

Stay safe and… Party on!


by Markus Karg at January 09, 2021 04:00 PM

Oracle Joins MicroProfile Working Group

by dmitrykornilov at January 08, 2021 06:02 PM

I am very pleased to announce that since the beginning of 2021 Oracle is officially a part of MicroProfile Working Group. 

In Oracle we believe in standards and supporting them in our products. Standards are born in blood, toil, tears, and sweat. Standards are a result of collaboration of experts, vendors, customers and users. Standards bring the advantages of portability between different implementations that make standard-based solutions vendor-neutral.

We created Java EE which was the first enterprise Java standard. We opened it and moved it to the Eclipse Foundation to make its development truly open source and vendor neutral. Now we are joining MicroProfile which in the last few years has become a leading standard for cloud-native solutions.

We’ve been supporting MicroProfile for years before officially joining the Working Group. We created project Helidon which has supported MicroProfile APIs since MicroProfile version 1.1. Contributing to the evolution and supporting new versions of MicroProfile is one of our strategic goals.

I like the community driven and enjoyable approach of creating cloud-native APIs invented by MicroProfile. I believe that our collaboration will be effective and together we will push MicroProfile forward to a higher level.


by dmitrykornilov at January 08, 2021 06:02 PM

How to Use Eclipse Transformer to Convert a 3rd Party Library to the New Jakarta Namespace

by Rudy De Busscher at January 07, 2021 10:02 AM

Introduction

The release of Jakarta EE 9 breaks a tradition of Java Enterprise. A legal requirement of the Java EE code donation from Oracle to the Eclipse Foundation is the change of the namespace of javax to jakarta.


But the change of the package and XML namespace in Jakarta EE 9 is only the beginning. The change of the namespace allows for new development and functionality, but all frameworks and libraries using one of the Java Enterprise specifications also need to be adjusted to the new version.


by Rudy De Busscher at January 07, 2021 10:02 AM

Hashtag Jakarta EE #53

by Ivar Grimstad at January 03, 2021 10:59 AM

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

Happy New Year!

It’s 2021 and a year since I wrote the very first Hashtag Jakarta EE. I find it useful for myself to write these short recaps of what’s going on in the community, and I hope you enjoy them as well!

On the very last day of 2020, Eclipse GlassFish 6 was released! Go to glassfish.org/download to check it out. GlassFish 6 meets the compatibility requirements of Jakarta EE 9. Downloads are available for both the Platform and the Web Profile.

If you want to have a look at the other fishes in the Jakarta EE and MicroProfile space, take a look at A day of fishing with Jakarta EE and MicroProfile by Edwin Derks. In this blog post, Edwin describes the differences and similarities between GlassFish, Payara, and Piranha.

The Jakarta EE Virtual Tour continues in 2021. The ones we have planned so far are Silesia JUG (Jan 13), JUG Darmstadt (Jan 13), Barcelona JUG (Jan 20), and Chicago JUG (Feb 25). Please reach out if you are interested in hosting us at your JUG or MeetUp.


by Ivar Grimstad at January 03, 2021 10:59 AM

JConf Peru 2020 Conference Report

by Reza Rahman at January 03, 2021 06:22 AM

JConf Peru 2020 took place October 23-24. This was the second time the event was held and due to the pandemic, the 2020 event was virtual and free. I am very proud to have participated as an invited speaker – the JConf series is an admirable effort by the Spanish speaking Java community to hold world-class events. My friend and Peru JUG leader Jose Diaz and his wife Miryan Ramirez have worked hard to make JConf Peru a reality. I delivered three talks at the conference focused on Java, Jakarta EE and Azure.

How Microsoft Learned to Love Java

On the first day of the conference I delivered my Java on Azure focused talk “How Microsoft Learned to Love Java”. The talk is essentially a tour of the broad range of services, tools and APIs Microsoft provides around Azure to better serve Java developers. I also briefly discuss the Java on Azure roadmap at a high level. The slides for the talk are available on Speaker Deck. There is a brief end-to-end demo that is part of the talk. You can run the demo yourself using step-by-step instructions available on GitHub to get a feel for how the Java on Azure experience looks like (please reach out if you need help). The video for the talk is now posted on YouTube.

On the same day there were talks on Jakarta EE, MicroProfile and Quarkus delivered by folks like Jonathan Vila, Alex Soto, Daniel Dias, Fabio Turizo, Jorge Cajas and Victor Orozco.

Jakarta EE on Azure Magic Mystery Show

On the second day I delivered my demo-driven, entirely slide-less talk “Jakarta EE on Azure Magic Mystery Show”. The talk covers the many ways Java EE/Jakarta EE developers can migrate their applications to Azure including virtual machines, Docker, Kubernetes and PaaS. All the material for the talk is available in self-paced workshop format on GitHub. The workshop will take you about a day to complete end-to-end (please reach out if you need any help). The video for the talk is now posted on YouTube.

It is worth reminding that myself and my team are always ready to work closely with Java EE/Jakarta EE developers on Azure migrations – completely for free. To take advantage of this, you simply need to fill this survey out or reach out to me directly.

Jakarta NoSQL Powered by Cosmos DB on the Cloud

Later in the afternoon I delivered one of my newer talks “Jakarta NoSQL Powered by Cosmos DB on the Cloud”. This talk covers using the new Jakarta NoSQL specification with Azure Cosmos DB. Cosmos DB is a multi-mode NoSQL database service on Azure that is compatible with MongoDB, Cassandra and Gremlin. The slides for the talk are available on Speaker Deck. Most of the talk is actually a demo. You can run the demo yourself using step-by-step instructions available on GitHub (please reach out if you need help). The demo currently covers MongoDB, I would love PRs covering Cassandra and Gremlin. The video for the talk is now posted on YouTube.

On the second day there were more talks on Jakarta EE and MicroProfile delivered by folks like Otavio Santana, Geovanny Mendoza, Aristides Villareal, Isaac Ruiz Guerra, Alex Soto and Fabio Turizo.

Beautiful Peru

Peru is a country rich in heritage and natural beauty. It is one of the six cradles of civilization and the center of the mighty Inca entire. I am proud to say I got to see a bit of this amazing country as part of my brief trip for the first JConf Peru. Just check out the album below of photos I took (click this link to view the album if the embedded slideshow is not working)!

All in all, I am happy to have had the opportunity to speak at JConf Peru again. I am very glad the event continued in virtual format despite the pandemic. I hope to speak there again and hopefully visit beautiful Peru again in the future.


by Reza Rahman at January 03, 2021 06:22 AM

Building and deploying a Jakarta EE application on OpenShift

by WildFly Admin (francesco@mastertheboss.com) at December 30, 2020 02:26 PM

This is the second article about building and deploying a Jakarta EE service in the Cloud. In the first tutorial, we have covered How to build and deploy a Jakarta EE application on Kubernetes

Now we will show how to deploy the same application on OpenShift container application platform.


by WildFly Admin (francesco@mastertheboss.com) at December 30, 2020 02:26 PM

Peter McKinnon, Corona and Jakarta EE 9: Goodbye 2020! – The Two Minutes Tuesday 014

by Markus Karg at December 29, 2020 10:00 PM

Hey guys!

The year is nearly over, so it is time to look back what the past twelve months brought us.

A world-wide pandemic brought us COVID19, and with is masks, social distancing, home office – and THIS Youtube channel! Yes, indeed, I started this channel to better get through this hard times without losing touch to my audience. As it was impossible to do a gig on stage, I asked @Peilung0 to record shows where I do some coding and out of that we developed great formats: Head Crashing Informatics with its headliner “JAX-RS Done Right!”, The Two Minutes Thuesday, and the latenight live show “Tonite #WithMe”. Inspired heavily by our idols, Peter McKinnon, Edgar Wright and Gavin Hardcastle. And certainly 2020 brought us Jakarta EE 9, JAX-RS 3.0, and Java 15, which I talked a lot about in the past years on stage, and couldn’t resist to produce several videos about!

I really thank everybody for watching my shows, sending all the great comments and helping me pushing this forward. Now that the vaccine is here, 2021 will be really great, so while I really want to extend my Youtube activities, I really look forward to be back on stage and meet you face-to-face again at some programming coference or at a JUG.

CU!


by Markus Karg at December 29, 2020 10:00 PM

Improve Oracle JDBC performance by fetch size tuning

December 27, 2020 10:00 PM

By default, when Oracle JDBC driver executes query, it retrieves a result set of 10 rows at a time from the database cursor. Low fetch size value might cause more roundtrips to DB and this leads to a longer time to fetch results from queries. You can change the number of rows retrieved with each trip to the database cursor by changing the row fetch size value.

Statement, PreparedStatement, CallableStatement, and ResultSet provides next methods for dealing with fetch size:

void setFetchSize(int rows) throws SQLException

int getFetchSize() throws SQLException

Default fetch size value can be changed by defaultRowPrefetch connection property:

On Wildfly Application Server DataSource level by:

[standalone@localhost:9990 /] /subsystem=datasources/data-source=ExampleOraDS/connection-properties=defaultRowPrefetch:add(value=1000)

On Hibernate level by hibernate.jdbc.fetch_size property:

<properties>
  ...
  <property name="hibernate.jdbc.fetch_size" value="1000" />
  ...
</properties>

I did simple test:

@Test
public void defaultRowPrefetchTest() throws Exception {
   EntityManager em = Persistence.createEntityManagerFactory("myDSTestOra").createEntityManager();

   Long time = System.currentTimeMillis();

   Query q = em.createNativeQuery("SELECT * FROM MY_TABLE", Tuple.class);
   List<Tuple> resultList = q.getResultList();

   System.out.println(System.currentTimeMillis() - time);
}

And on my laptop, fetching of 16K records takes ~185 ms with default value and ~86 ms with defaultRowPrefetch = 20000. As you can see from the result - there is more than x2 performance improvement.

Source code of test case on GitHub


December 27, 2020 10:00 PM

Microprofile metrics with Wildfly Application Server

December 26, 2020 10:00 PM

Any enterprise application can't be completely successful on production without good monitoring solution. For years vendors and developers provided custom tooling for it. Since Eclipse Microprofile Metrics specification we have a unified way to export monitoring data to the management agents and unified Java API, that developers can use to expose their telemetry data.

Wildfly application server provides microprofile metrics support, but unfortunately only for standalone configurations yet. In case domain mode you can provide necessary dependencies

dependencies {
    compile group: 'org.eclipse.microprofile.metrics', name: 'microprofile-metrics-api', version: '2.3'
    compile group: 'io.smallrye', name: 'smallrye-metrics', version: '2.4.0'
}

and then expose application scope metrics through custom endpoint like

import io.smallrye.metrics.exporters.JsonExporter;
import io.smallrye.metrics.exporters.OpenMetricsExporter;
...
@Singleton
@Path("/metrics")
public class MetricsTestResource {

  private OpenMetricsExporter openMetricsExporter = new OpenMetricsExporter();
  private JsonExporter jsonExporter = new JsonExporter();

  @GET
  @Path("/prmths")
  public String prometheus() {
    return openMetricsExporter.exportAllScopes().toString();
  }

  @GET
  @Path("/json")
  public String json() {
    return jsonExporter.exportAllScopes().toString();
  }

JVM and subsystems metrics will not be available by endpoint above, but them you can obtain through old good JMX.

Standalone server from the box provides metrics in prometheus format for all scopes over management interface (port 9990 ) using org.wildfly.extension.microprofile.metrics-smallrye extension and microprofile-metrics-smallrye subsystem.

kostenko@kostenko:$ curl http://127.0.0.1:9990/metrics/
# HELP base_classloader_loadedClasses_count Displays the number of classes that are currently loaded in the Java virtual machine.
# TYPE base_classloader_loadedClasses_count gauge
base_classloader_loadedClasses_count 11826.0
# HELP base_cpu_availableProcessors Displays the number of processors available to the Java virtual machine. This value may change during a particular invocation of the virtual machine.
# TYPE base_cpu_availableProcessors gauge
base_cpu_availableProcessors 8.0
...

For developers available next annotations (sorry for the low output examples values):

  • @Counted - counter, which counts the invocations of the annotated object.
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_total counter
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_total 1.0
    
  • @ConcurrentGauge - gauge which counts the parallel invocations of the annotated object.
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_current gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_current 1.0
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_max gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_max 1.0
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_min gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_min 0.0
    
  • @Gauge - gauge, which samples the value of the annotated object.
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_json gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_json 123.0
    
  • @Metered - meter, which tracks the frequency of invocations of the annotated object.
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_total counter
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_total 6.0
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_rate_per_second gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_rate_per_second 0.209682602430885
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_one_min_rate_per_second gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_one_min_rate_per_second 0.015991117074135343
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_five_min_rate_per_second gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_five_min_rate_per_second 0.0033057092356765017
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_fifteen_min_rate_per_second gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_fifteen_min_rate_per_second 0.0011080303990206543
    
  • @Metric - annotation that contains the metadata information when requesting a metric to be injected.
  • @Timed - timer, which tracks duration of the annotated object.
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_rate_per_second gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_rate_per_second 0.09811766798116955
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_one_min_rate_per_second gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_one_min_rate_per_second 0.030703655021877174
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_five_min_rate_per_second gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_five_min_rate_per_second 0.0065567799035988195
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_fifteen_min_rate_per_second gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_fifteen_min_rate_per_second 0.002209922141215539
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_min_seconds gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_min_seconds 5.88813E-4
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_max_seconds gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_max_seconds 0.005724684
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_mean_seconds gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_mean_seconds 0.0030220556126073638
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_stddev_seconds gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_stddev_seconds 0.0025644006235855748
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_seconds summary
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_seconds_count 2.0
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_seconds{quantile="0.5"} 5.88813E-4
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_seconds{quantile="0.75"} 0.005724684
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_seconds{quantile="0.95"} 0.005724684
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_seconds{quantile="0.98"} 0.005724684
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_seconds{quantile="0.99"} 0.005724684
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_seconds{quantile="0.999"} 0.005724684
    
  • @SimplyTimed - simple timer, which tracks duration and invocations of the annotated object.
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_total counter
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_total 1.0
    # TYPE application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_elapsedTime_seconds gauge
    application_org_kostenko_examples_microprofile_metrics_MetricsTestResource_prometheus_elapsedTime_seconds 0.005032859
    

Prometheus is a free software application used for event monitoring and alerting. It records real-time metrics in a time series database (allowing for high dimensionality) built using a HTTP pull model, with flexible queries and real-time alerting.

Let's setup above and check how metrics monitoring with Prometheus looks on practice:

wget https://github.com/prometheus/prometheus/releases/download/v2.23.0/prometheus-2.23.0.linux-amd64.tar.gz
tar xvfz prometheus-*.tar.gz
cd prometheus-*

To provide path to the metrics endpoint edit prometheus.yml and provide correct metrics_path and targets

# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
    - targets: ['127.0.0.1:9990']

This is it! http://localhost:9090/graph :
wildfly-microprofile-metrics

Now our metrics is collecting and can be visualized over standard prometheus UI(shown above) or easy integrated with grafana

Source code of custom metrics endpoint example available on GitHub


December 26, 2020 10:00 PM

Merry X-Mas – Head Crashing Informatics 24 | Comedy Special

by Markus Karg at December 26, 2020 04:00 PM

Celebrate Christmas with Leo and Markus!

Leo and Markus are having fish for Christmas Dinner – but certainly rather unpleasant things do happen… Have fun watching our Head Crashing Informatics X-Mas Comedy Special!

Merry X-Mas!

Stay safe and… Party On!

Please support my work and become my patreon!


by Markus Karg at December 26, 2020 04:00 PM

A day of fishing with Jakarta EE and MicroProfile

by Edwin Derks at December 24, 2020 09:23 AM

Over the years, several implementations of the Jakarta EE and MicroProfile platforms have been developed by vendors. Some implementations are fully compatible with these platforms, others support a subset of specifications from the platforms, or are building on top of these. Implementations are often built as an open-source project and shipped by a vendor as a product for their customers. One of the things I noticed over the years, is that these projects are often named after animals. More particularly, there are currently three Jakarta EE / MicroProfile supporting runtimes available that refer to… fish. The members of this trio in question are:

Product Name Link
Eclipse GlassFish https://glassfish.org
Payara https://www.payara.fish
Piranha https://piranha.cloud

Since they share a common aspect in their product name, does that mean that they have something other in common, or is this just a coincidence? Let’s go over the high-level purpose and product definitions to find that out.

Eclipse GlassFish

If we look at the Jakarta EE compatible products page, Eclipse GlassFish shows up as both a Jakarta EE 8 and Jakarta EE 9 compatible application server. Looking at the history of Eclipse GlassFish, this is not a surprise. Until this project was moved from Oracle to the Eclipse Foundation in 2017, it was the reference implementation application server for Java EE. After moving Java EE to the Eclipse Foundation and rebranding the platform as Jakarta EE, the official concept of a reference implementation has been dropped. Although, technically speaking, Eclipse GlassFish remains the “unofficial” reference implementation of new versions of Jakarta EE. This means that for future versions of Jakarta EE, Eclipse GlassFish can be used to test-drive updates to, or implementation of, new specifications that are going to be supported by Jakarta EE. In addition, speaking hypothetically, if no other vendors would be around to implement Jakarta EE, the Eclipse Foundation would still have its own implementation of Jakarta EE under their own roof. This is important because, without any implementations, the Jakarta EE platform is just a set of specifications that be used to build enterprise applications, but not run them.

As a developer, you can easily download Eclipse GlassFish and use this application server to start a project in order to build enterprise applications. However, there are two things noteworthy that you should know:

  • This application server only implements the Jakarta EE platform. It lacks the cloud-native capabilities that the MicroProfile specifications add when compared to other application servers that implement both Jakarta EE and MicroProfile;
  • There is currently no commercial support available for Eclipse GlassFish. If you want to use this application server for your projects in production, that is perfectly fine. However, without such a support contract, in case you run into problems and are in need of a patch or fix, you are at the mercy of the community. You can file an issue in the open-source project or provide a patch there yourself in order to eventually release a new version of Eclipse GlassFish containing the fix.

Payara

Simply put, Payara is a commercially supported project that builds on Eclipse GlassFish while building their own commercial features on top of it. When we look at the Jakarta EE compatible products page, Payara shows up as a Jakarta EE 8 compatible application server. However, since Jakarta EE 9 has been released this month, and having a compatible Eclipse GlassFish application server around the corner, we can expect a Jakarta EE 9 compatible version of Payara shortly.

Over the years, Payara has built an ever-growing set of commercial features in their product. These features often aim at cloud-native development. This makes Payara a good fit for running instances in microservices architectures deployed on cloud environments. In addition, the company aims to support the latest LTS releases of Java, even providing support for various JVMs that you can use to run Payara. Speaking of running Payara, you also have the option of using the full-blown application server, or a slimmed down runtime in the form of Payara Micro. In case you are a fan of Uber/Fat JAR’s, you even have the option of generating such artifacts with Payara Micro.

In short, as a developer, you can use Payara for building and deploying enterprise applications in modern, cloud-native environments using some of your favorite flavors for packaging and running your applications. A few things noteworthy to mention for Payara are:

  • Payara provides support for migration from another application server to Payara in case you are interested in such a migration;
  • Payara supports both Jakarta EE and MicroProfile in order to make it a fit for running in cloud-native environments;
  • Payara provides several features for optimizing resource consumption of running Payara instances.

Piranha

Although this product references a fish, it is a new kid on the block and doesn’t share any particular existing base for Jakarta EE or MicroProfile. Piranha is not compatible with Jakarta EE or MicroProfile (yet) but supports a large part of the specifications in enterprise applications that you can build and run on Piranha. Like some other newer runtimes on the market that support Jakarta EE and/or MicroProfile specifications, it uses the best breeds of implementations or provides its own. Having that said, what are Piranha’s goals?

The product definition states that you can use Piranha to build Jakarta EE and MicroProfile based applications (among other frameworks or libraries), aiming for the smallest runtime possible in order to run them. Ship less, consume less, spend less seems to be the goal, which makes sense in cloud-native environments where spending resources cost money and spending less can be beneficial.

When you are interested in using Piranha as a developer, you should know these things:

  • Piranha is brand new and, as far as I know, doesn’t provide commercial support yet. However, if you are in the situation of building a non-mission-critical application from the ground up with cost efficiency in mind, starting off with Piranha should not hurt. With your feedback, you can help shape and mature the product, which can benefit you in the long run;
  • Piranha supports or integrates with other frameworks and libraries that might be a good fit for your project. This even includes GUI’s and testing, so be sure to check these out!

Conclusion

Next to these “fishy” runtimes from the Jakarta EE and MicroProfile ecosystems, there are of course several other runtimes available that you can check and try out in order to see if these are a fit for your project.

I’m curious if there will be any future implementations referring to a fish, and what the idea or vision behind the name would be. How would you name your “fishy” runtime? Please reach out to me on my Twitter when you have an idea, and who knows we can start a trend or project that makes it happen.


by Edwin Derks at December 24, 2020 09:23 AM

Back to the top