Java Community Process Update

The Java™ Community Process has been updated through JSR 387: Streamline the JCP Program. The most significant change is to open up for Iterative JSRs, i.e. JSRs that intend to deliver multiple releases of a technology on a time-based cadence. The driving force for this change is the 6 month release cadence for Java™ SE.

The first JSR using the option for being iterable is JSR 388: Java™ SE 13 (I guess the JSR name will have to be changed to not include the version number…).

Another change made in this update where changes to reviews and ballots in order to make the process even lighter to accommodate shorter release cycles.

The™ Java Community Process

Amazon Corretto 8

UPDATE! I have updated the option of running Corretto in Docker to using the amazoncorretto Docker image available from Docker Hub.

Amazon Corretto is a production-ready distribution of OpenJDK with long-term support including performance- and security updates provided by Amazon.

Tweet announcing Amazon Coretto 8

Amazon provides installation packages and instructions for Linux, Windows, and macOS, as well as a Docker. The latest installation package is based on OpenJDK version 1.8.0_202:

$ java -version
openjdk version "1.8.0_202"
OpenJDK Runtime Environment Corretto-8.202.08.2 (build 1.8.0_202-b08)
OpenJDK 64-Bit Server VM Corretto-8.202.08.2 (build 25.202-b08, mixed mode)
$

If you don’t want to, or isn’t able to install Corretto on your workstation, t is pretty straightforward to try it out using Docker:

$docker run -it amazoncorretto

bash-4.2# java -version
openjdk version "1.8.0_202"
OpenJDK Runtime Environment Corretto-8.202.08.1 (build 1.8.0_202-b08)
OpenJDK 64-Bit Server VM Corretto-8.202.08.1 (build 25.202-b08, mixed mode)

bash-4.2#

Amazon Corretto is licensed under the same license as OpenJDK (GPLv2 with CPE) and there are no costs associated with using it. Amazon will provide quarterly security updates to Corretto 8 at least until June 2023.

But Java 8 is sooo old!

Relax, Amazon plans to make Corretto 11 available during the first half of 2019. Corretto 11 will be based on OpenJDK 11.

A First Look at Oracle Functions

I am super happy to have gotten the opportunity to test out Oracle Functions through the Cloud Native Limited Availability Program. When I last tried out running serverless functions in Oracle Cloud during the Oracle Groundbreaker APAC Tour last year, there were two options available. Either run my own Fn server in a virtual machine or set it up in a managed Kubernetes cluster. Now, a third option is available!

Oracle Functions is built on Oracle Cloud Infrastructure (OCI) and offer a managed environment for the Fn project. This means that you don’t have to manually manage an Fn cluster yourself. It also means that any function that runs on Oracle Functions will also run on any Fn server, something that offers you full flexibility.

The Fn project supports functions written in Go, Java, Node.js, Python or Ruby. The fn-duke function that I am using in this test is, of course, written in Java.

package eu.agilejava.fn;

public class HelloFunction {

    public String handleRequest(String input) {
        String configuredName = System.getenv("name");
        String name = (input == null || input.isEmpty()) ? configuredName  : input;
        return "Hello, " + name + "\n";
    }
}

Deployment is done by pointing to the Function Application you want your function to be part of.

fn deploy --app FunctionDuke

The function can be configured through the func.yaml file or using the fn CLI tool as shown here:

fn config function FunctionDuke fn-duke name World

The configured property will then be shown in the detail view in your Oracle Cloud Function Dashboard.

Invoking the function can be done by using the Fn CLI Tool

fn invoke FunctionDuke fn-duke

Or by sending a signed request using a convenience script called oci-curl provided by Oracle.

oci-curl "x3vzdahhy3a.us-phoenix-1.functions.oci.oraclecloud.com" get "/t/fn-duke-trigger" -d 'Duke'

Conclusion

Oracle has made a good choice when investing in the Fn project and use it as a basis for the Oracle Functions platform. It integrates extremely well with Fn and no extra tooling is needed to get started.

Eclipse GlassFish 5.1 is here!

The release of Eclipse GlassFish 5.1 is an important milestone for Jakarta EE!

First of all, it is a confirmation that the GlassFish source code contributed by Oracle is possible to build and assemble on Eclipse Infrastructure.

Second, by passing the Java EE 8 Compatibility tests, it verifies that the code contributed follows the Java EE 8 specifications, hence is Java EE 8 Compatible.

Download Eclipse GlassFish 5.1 and give it a try!

And while you’re at it, why don’t you try it out with Apache NetBeans as I have shown below.

Eclipse GlassFish 5.1 in Apache NetBeans 10

Java EE with NetBeans 10

The Apache NetBeans project is really shaping up. Version 10.0 was released on the 27th of December 2018. The main features added since version 9.0 are listed on the download page. For me personally, the most important feature is the JDK 11 Support.

So, what about Java EE then?

Until all the NetBeans sources have been transferred from Oracle to Apache and incorporated into the Apache NetBeans build, an additional step is required in order to get Netbeans set up for Java EE development.

The first thing you need to do is to add the NetBeans 8.2 Distribution Update Center. Select Tools->Plugins in Apache NetBeans 10.0. Then click on the Settings tab and choose Add. Paste in the URL:

http://updates.netbeans.org/netbeans/updates/8.2/uc/final/distribution/catalog.xml.gz

Update Plugin Center Configuration

After saving the configuration, the next step is to select the Available Plugins tab and type java ee in the search field.

Search for Java EE plugins

As a minimum, check the plugin called Java EE Base and click the Install button. Follow the instructions and accept the licenses. NetBeans will need to restart before continuing after the installation.

After this, you are able to set up a Java EE server as shown with GlassFish 5.0 below. Choose Tools->Servers and then click Add Server.

GlassFish 5.0 with NetBeans 10.0

Happy Coding!

2018 Annual Summary

It’s this time of the year again. Time for the yearly summary of conferences, travels, community activities, open source projects, amazing people!

Like most recent years, I have been speaking at quite a few conferences around the World. The countries I visited as a speaker in 2018 were Sweden, Germany, USA, England, Denmark, France, Belgium, South Africa, Australia, and New Zealand.

Speaker Appearances 2018

One of the highlights this year was to be awarded the JCP Outstanding Spec Lead Award together with Christian Kaltepoth for our work with JSR 371.

Getting the JCP Award for Outstanding Spec Lead 2018

Another acknowledgement by the community was to be re-elected for an associate seat in the JCP Executive Committee.

Besides speaking at conferences, a great deal of my time in 2018 was dedicated Jakarta EE at the Eclipse Foundation where I act as the PMC Lead of EE4J a well as being a member of the Steering-, Specification-, and Marketing Committees in the Jakarta EE Working Group.

All in all 2018 was an eventful year and I expect no less of 2019!

Oracle Groundbreaker APAC Tour 2018

This year, I was so lucky to get the chance to be part of the Oracle Groundbreaker APAC Tour 2018. The cities that I joined the tour was Perth and Melbourne in Australia as well as Wellington in New Zealand.

Perth, Australia

Copenhagen – (Singapore) – Perth
Gone swimming…

In Perth, I did a talk called Serverless with Java. I demoed various FaaS options available, including running Fn Project on Oracle Cloud. Between the sessions, I also managed to slip outside for a swim in the ocean.

Melbourne, Australia

Perth – Melbourne
New bush hat

In Melbourne, I had two sessions scheduled. The first was an informal Q&A with the local Java User Group. We had great discussions regarding the 6 months release cadence of Java, we discussed Jakarta EE and Eclipse MicroProfile and talked about Java development and Java user groups in general.

Later that afternoon, I did my Serverless with Java talk for a small, but an enthusastic crowd. 

Wellington, New Zealand

Melbourne – Wellington
Installing fn on OKE

The last stop on the journey was Wellington, New Zealand. Even here, it was the Serverless with Java talk that was put on the schedule.

To spice things up a little, I did a last minute try to get fn up and running on a managed Kubernetes cluster in Oracle Cloud Infrastructure.

I was close, so the next time I do this talk this will be part of the demos…

Wrap up

This was a fantastic trip, even considering the busy travel schedule and probably spending more time in the air or at airports than on the ground. The trip home from Wellington took ~36 hours door-to-door with short layovers in Auckland, Perth, and Singapore.

WLG – AKL
AKL – PER
PER – SIN
SIN – CPH

Source Code

The Function Duke project on GitHub contains all the source code for my serverless talks.

While Waiting for Jakarta EE

It is more than a year since Oracle announced the transfer of Java™ EE to Eclipse Foundation at JavaOne 2017. Since then, a lot has happened:

  • Java™ EE 8 API and implementation projects have been set up under EE4J.
  • The Eclipse GlassFish 5.1 release is approaching.
  • A brand new Jakarta EE specification process is right around the corner.
  • Community shows involvement regarding the technical direction of Jakarta EE.
  • The Jakarta EE NoSQL specification project proposal has been created.

This is all very good, excellent actually! When you think about the size of it all, it is actually quite an achievement. We are talking about 7.7 million lines of code! More than 60.000 files and a total of 38 new projects that have been set up at the Eclipse Foundation.

But, as everyone knows, developers are impatient and eager to try out everything new, so there are still a couple of questions that I always get when talking about Jakarta EE:

  • When can I start developing Jakarta EE applications?
  • How does Eclipse MicroProfile fit in this picture?

The answer to the first question is: “not yet”. Until the Jakarta EE specification process is finalized, the technologies are still Java™ EE. 

The answer to the second question differs a little depending on who you ask, but usually is something in the lines of “I am pretty sure that some of the MicroProfile specs will be integrated into Jakarta EE when they have proven to be useful”.

So, what should an eager developer do in the meantime? Switch to Spring Boot…ouch…or…JavaScript…squeal…?

NO, here is what you should do: Use the power of JavaEE 8 and combine it with Eclipse MicroProfile.

Many of the application server vendors have added MicroProfile features to their Java™ EE 8 compliant or certified application servers. Examples are Open Liberty, WildFly, Payara and Apache TomEE. See the respective vendor’s documentation for which versions they have included.

Java EE 8 with Eclipse MicroProfile 2.1

I have put together a simple application called Jakarta EE Duke to demonstrate how to do this. The application uses the @ConfigProperty annotation from MicroProfile Config to configure a message as well as the new @Email annotation from Bean Validation 2.0, which came with Java™ EE 8 to validate input.

While this example is extremely simple, it does indicate how you can combine the full power of Java™ EE 8 with the lightweight APIs of MicroProfile to implement cloud-native microservices using Java™ technology.

One last tip: Make sure to join the Jakarta EE Community Mailing list to always stay up-to-date on the latest development of Jakarta EE.

#JavaOneStreak revamped to #GetFitForCodeOne

The last couple of years, we have been running a concept called JavaOneStreak the month before JavaOne. Since JavaOne is history, and the event replacing it is Oracle Code One, it makes sense to renew this concept as well. 

The original JavaOneStreak was to run a mile a day for in last month before the conference and tweet about it using the hashtag #JavaOneStreak.

For this year’s Oracle Code One, I want to expand the concept to include any physical exercise.

How does it work?

1. Work out (yes, you have to get out of that chair!)
2. Log your move using your favorite activity tracker (e.g. Endomondo)
3. Tweet about it using the hashtags #GetFitForCodeOne and #CodeOne (for extra exposure)

If you join the challenge on Endomondo, you will get listed below: