Tuesday Aug 25, 2015

Asynchronous Support in JAX-RS 2/Java EE 7

Asynchronous processing, non-blocking I/O, events and messaging are keys to more reactive applications. Fortunately Java EE has long organically provided such features in the platform at pretty much every key API layer including Servlet, CDI, EJB and JMS. These features were strengthened further in Java EE 7 and even more could be done in Java EE 8. Spurred by a real world developer I met at a conference writing a highly reactive IoT application with Java EE, I've actually developed a talk about reactive features in Java EE (click here if you can't see the embedded slide deck):

One such feature added in JAX-RS 2/Java EE 7 gets surprisingly little exposure - asynchronous capabilities added for both server-side REST endpoints as well as clients. Fortunately Sam Sepassi has stepped up nicely to fill the gap with a detailed blog entry that covers both the servers-side and client side capabilities. Bonus points to Sam for demonstrating how nicely JAX-RS 2 asynchronous endpoints and EJB @Asynchronous work together! Sam also shows the Java EE 7 Concurrency Utilities in action and does a nice job explaining the basics/what's going on under the hood.

Monday Aug 24, 2015

Java API for JSON Binding (JSON-B) 1.0 Early Draft Now Available!

The first early draft of the Java API for JSON Binding (JSON-B) 1.0 is now available for you to review: https://jcp.org/aboutJava/communityprocess/edr/jsr367/index.html. As discussed below this is distinct from the Java API for JSON Processing (JSON-P) 1.1, which also recently published it's own first early draft. Like all early drafts for JSRs, the goal is to foster dialog, feedback and participation. Although it is just an early draft the thirty-five page specification document is actually fairly far along so providing useful feedback should be easy.

JSON is increasingly becoming the de-facto data interchange format on the web, be it for mobile, HTML5/JavaScript rich-client or microservices applications. While Jersey, EclipseLink, GlassFish and WebLogic have long provided strong support for JSON via EclipeLink MOXy, it has been a goal in the Java EE platform to make JSON a first class citizen to the degree where it can become just another natural serialization format for Java. Towards that goal Java EE 7 provided simple JSON processing support via JSON-P. That support is being beefed up further in Java EE 8 by supporting more JSON standards in JSON-P such as JSON Pointer, JSON-Patch and the like. As a parallel effort Java EE 8 also plans to provide a much higher level JSON binding API via JSON-B. The idea is to make JSON handling in the platform so ubiquitous and easy-to-use that it is almost invisible akin to JAXB in the XML world.

If these are ideas that interest you, now is the time to get involved with JSON-B and join other folks in the community that are already helping out. The JSON-B early draft gives special thanks to Olena Syrota, Oleg Tsal-Tsalko and the Ukraine JUG for their contributions even at this stage. These folks have helped us with feedback, community building as well as evangelizing.

There are many ways for you to get involved as always. You are always welcome to join the expert group proper via the JCP page for the specification. You can always simply join the discussion by subscribing to the JSON-B specification user alias. If you would rather participate as a group through your JUG you can do that easily via Adopt-a-JSR.

Monday Aug 17, 2015

A Journey from Tapestry to JSF 2.2 and JavaEE 7

After the key Java EE 6 release we have seen a steady stream of folks migrating from various non-standard frameworks to Java EE - all for their own good reasons. One such very recent detailed migration story was shared by Lenny Primak. He successfully migrated from Tapestry to Java EE 7/JSF 2.2 and shared his observations in a series of (eighteen!) blog entries. His candid independent insights with regards to JSF/Java EE are likely very helpful to current and potential adopters.

I do think it is very important to take any such migration story with a grain of salt. All of this is just one person's view about what is right for them while choosing amongst a complicated set of trade-offs. It is never wise to over-generalize from those unique perspectives instead of choosing what is right for a given situation. We certainly should not forget that all non-trivial technology has it's advantages and drawbacks over time. Tapestry is a great technology in the overall ecosystem that standards like JSF do adopt good ideas from (and the opposite is likely to also be true). It is also possible to use Tapestry with Java EE as an alternative to JSF.

You can read Lenny's entire migration story on his personal blog. Although eighteen entries can seem daunting each entry is short/to-the-point and well written. Here are some highlights for the very impatient:

  • In the conclusion Lenny notes "As I looked at the big picture, it turned out to be easier to convert the whole app from T5.3 to JSF and PrimeFaces instead of T5.4, and that’s what I did. This turned out a great decision. Everything is compatible, future JavaEE versions are easily adoptable, all integrations do not require heroic efforts to implement or maintain and even JavaScript and Ajax with JQuery even started to be fun to develop."
  • Lenny opted to use Apache Shiro instead of built-in Java EE application server security such as GlassFish Security or WebLogic Security. He found that Shiro was easy to use with JSF and Java EE - "After the switch to JSF, however, Shiro, with it’s standard configuration, worked as expected, and I was able to build all of the security requirements in the application very quickly."
  • Lenny had some nice things to say about JSF generally and JSF 2.2 in particular - "The JSF way seems to be more flexible and saves code", "writing the same function in JSF and PrimeFaces took only about 10 lines of CoffeeScript code", "...major feature of JSF 2.2 is HTML 5 support, and ability to write JSF applications in standard HTML5 syntax as opposed to JSF tags...this development prompted me to re-evaluate JSF as my tool set".
  • Lenny found contributing to Java EE extremely easy "when trying to contribute to JavaEE, I was welcomed right away. The attitude really shined, and I was able to contribute valuable bug fixes without too much hassle."
  • Lenny found it more sensible to work with standard EJB 3 and JPA features instead of the Tapestry approach to persistence - "I found it better to call EJBs from Tapestry, and let EJBs handle all JPA transactions, thus totally bypassing Tapestry-JPA. This turned out to be the best solution of using JPA with Tapestry."
Do you have a similar interesting Java EE adoption story to share with the community? If so, please do reach out and we will find a way to properly highlight it.

Friday Aug 14, 2015

Submit Now to Win a Duke's Choice Award!

The incredible amount of innovation that uses and builds upon standard Java/EE technologies is one the most important factors that keeps our ecosystem so uniquely strong. The annual Duke's Choice Awards is a small way of recognizing and encouraging such innovation. Every year a panel of judges gives out ten of these awards at JavaOne. Submissions for this year is now open and you should check out the details right now.

Note that while some of the text uses the word "nomination", it simply means submitting (aka "nominating") your own project or work for consideration by the awards committee. There is no problem with doing this whatsoever and that is in fact what the submission form expects in most cases. That being said there is also no problem whatsoever in submitting on behalf of any project or work you think deserves the award even if you are not directly involved with it.

Besides some well-deserved recognition by the Java community, winners get a free JavaOne 2015 conference pass, a super cool Duke award statue and of course the winner's badge. Keep in mind the award isn't just for the framework or product developer types. In the past people using Java in innovative ways for "real world" projects, great educators and thought leaders have won too. Here are some example winners from the past few years for inspiration:

  • Apache TomEE - Innovative fully certified lightweight Java EE application server that is a drop-in replacement to Tomcat.
  • United Nations High Commissioner for Refugees/World Food Program Subsidy Card - A real world Java EE 7 application running on GlassFish that makes a real difference.
  • JCertif - Bringing Java/EE focused IT education to the African continent.
  • JEDI - Bringing Java/EE focused education to the Philippines.
  • DeltaSpike - A very useful CDI toolbox for Java EE developers.
  • Devoxx4Kids - A very cool initiative focused on teaching kid's programming facilitated by one of the largest Java developer conferences.
  • JDuchess - A program to strengthen women in Java.
  • London Java Community - The super active JUG involved in OpenJDK, JCP and Adopt-a-JSR.
  • Parleys.com - The world class e-Learning platform built on Java EE.
  • Arquillian - JUnit for Java EE, need I say more :-)?
  • jHome - An open source home automation platform built on Java EE and GlassFish.

You can check out all the past winners here. Do hurry up - the submission deadline is August 24. The submission form is here.

Tuesday Aug 11, 2015

Maven, Java EE and ... NetBeans

At the beginning, build tools capabilities were relatively simple, i.e. mostly compile and package the compiled sources. But over the years, those capabilities have largely evolved (e.g. complex build processes, dependencies management, documentation generation, testing integration, etc.). And it's probably fair to say that Maven has been, at least in the Java landscape, one of the main actors in that evolution... if not the most important one! Maven is widely used since many years, it's now the de-facto Java build environment. And if you are using another solution (e.g. Graddle), you can't ignore Maven; chances are high that you still have to directly or indirectly use Maven in a way or another (e.g. to integrate a 3rd party framework which uses Maven). 

In his "Truly Unleashing the Power of Maven and Java EE" article, Geertjan Wielenga (NetBeans Product Manager) talks about how well integrated Maven is in the NetBeans IDE. If you haven't used NetBeans and its Maven support, you should read this piece. It's amazing how Maven is supported in NetBeans. It's so nicely integrated that you sometime tend to forget that Maven is used under the hood.

Geertjan then discusses another strength of NetBeans, its Java EE support. He then concludes with "Maven and Java EE are baked into the very essence of what NetBeans IDE is, as its heartbeat, and as its raison d’être". So when you combine NB's deep Maven integration with its outstanding Java EE support, you get a rock-solid (and free!) environment to develop Java EE applications.


Visual representation of a Maven project's depencies in NetBeans

Monday Aug 10, 2015

Help Recognize Java Community Process (JCP) Heroes!

An open standard like Java/EE involves a lot of hard work from a lot of different groups of people. The hard work of these people, largely selflessly, benefit countless developers. For specification leads the work in the JCP is often far beyond just a job. I have seen the same to be true of many vendor experts on a specification. Especially admirable are the independents that contribute to specifications largely on their own time as well as Adopt-a-JSR participants. The annual Java Community Process awards is a small way of recognizing some of these great people and their work. This year's award nominations are now open - you should read the details here. There are four different awards:

  • JCP member or participant of the year
  • Outstanding specification lead
  • Most significant JSR
  • Outstanding Adopt-a-JSR participant

The awards will be presented at JavaOne 2015. These are the nominations I have personally made already:

  • Josh Juneau (for outstanding Adopt-a-JSR participant)
  • Arjan Tijms (for JCP member of the year)
  • Adam Bien (for JCP member of the year)
  • David Blevins (for JCP member of the year)
  • Ivar Grimstad (for JCP member of the year)
  • Antoine Sabot-Durand (for outstanding specification lead)
  • Manfred Riem and Santiago Pericas-Geertsen jointly (for outstanding specification lead)
  • CDI 2 (for most significant JSR)
  • MVC 1.0 (for most significant JSR)
Are there others that deserve nomination this year? If so, please don't hesitate to submit the nomination yourself using the very straightforward form. The form is only open until August 17th, so please do hurry!

Wednesday Aug 05, 2015

JavaOne 2015 Java EE Track Content Finalized (A Detailed Preview)

I am very pleased to share with you that the JavaOne Java EE track content is now finalized. In this brief but detail-rich entry on my personal blog, I want to take this opportunity to tell you a little bit about the track, key content and star speakers this year. The collective passion and dedication of all the folks that submitted helped us construct a very strong offering for the community at large. JavaOne is a key part of the global Java community far beyond the walls of Oracle and all of you are a large part of keeping it successful.

I hope to see you all at JavaOne. In the next coming weeks and months we will be sharing more details on the Java EE track, content and speakers at JavaOne. Lastly having been on the other side of the fence I know as much as you might come to JavaOne, it might not be a practical reality for you for a variety of good reasons. I want to remind you that we make a point to make JavaOne content openly available to all. That being said I want to tell you that you should make the pilgrimage to JavaOne at least once as a Java developer.

Monday Jul 27, 2015

Ivar Grimstad's Java EE Sessions at JavaOne 2015

For the Java EE track at JavaOne 2015 we are highlighting some key sessions and speakers to better inform you of what you can expect, right up until the start of the conference.

To this end we recently interviewed Ivar Grimstad. Ivar is a Java EE advocate, speaker, blogger and open source hacker. He is a part of the Java EE 8 MVC and Security JSRs. We wanted to talk to him about his two accepted sessions at JavaOne 2015, his expectations for JavaOne and his experiences in the JCP (click here if you can't see the embedded video):

The following are the sessions we talked about:

Besides Ivar's sessions, we have a very strong program for the Java EE track and JavaOne overall - just explore the content catalog. If you can't make it, you can be assured that we will make key content available after the conference just as we have always done.

Monday Jul 06, 2015

JavaOne 2015 Java EE Track Committee: Ryan Cuprak

This is the fourth and last in a series of interviews for you to meet some of the committee members for the JavaOne 2015 Java EE track. We will next move on to interviewing some of the key accepted speakers in the track this year.

The committee plays the most important part in determining the content for JavaOne. These good folks really deserve recognition as most of them devote many hours of their time helping move JavaOne forward, often as volunteers. If JavaOne matters to you, these are folks you should know about.

This last interview is with my good friend Ryan Cuprak. If you are having trouble seeing the embedded video below it is available here.

Ryan is the founder of the Connecticut JUG, author, blogger, speaker, JavaOne Rock Star and Java EE advocate. He is a senior manager at Dassault Systemes. Ryan is a brand new and welcome addition to the committee. In the interview he shares his experience and expectations for the Java EE track this year.

He also wrote up an excellent blog entry on his experience as a new committee member. He had some pretty good insights and very kind things to say about the process, JavaOne and Java EE that's worth a read.

On this note, I would like to make sure you know that the JavaOne content catalog is now already live with a few preliminary fairly obvious selections we were able to make. None of the sessions accepted at this stage are from Oracle speakers on our track. The folks that we selected early for acceptance include David Blevins, Jonathan Gallimore, Mohammed Taman, Rafael Benevides and Antoine Sabot-Durand. They will be talking about Java EE Connectors (JCA), Java EE 7 real world adoption, CDI and DeltaSpike. I would encourage you to check out all the early selections in the catalog. We are working to finalize the full catalog shortly.

I hope to see you at JavaOne. Do stay tuned for more interviews with some key speakers on our track.

Monday Jun 29, 2015

JavaOne 2015 Java EE Track Committee: Johan Vos

This is the third in a series of interviews for you to meet some of the committee members for the JavaOne 2015 Java EE track. The committee plays the most important part in determining the content for JavaOne. These good folks really deserve recognition as most of them devote many hours of their time helping move JavaOne forward, often as volunteers. If JavaOne matters to you, these are folks you should know about.

This interview is with Johan Vos. If you are having trouble seeing the embedded video below it is available here.

Johan is a Java Champion, author, speaker, blogger, member of the BeJUG steering group, member of the Devoxx steering group and a JCP member. He is a fan of Java EE, GlassFish and JavaFX. He founded LodgON, a company offering Java based solutions for social networking software. In the interview he shares his experience and expectations for the Java EE track this year.

On this note, I would like to make sure you know that the JavaOne content catalog is now already live with a few preliminary fairly obvious selections we were able to make. None of the sessions accepted at this stage are from Oracle speakers on our track. The folks that we selected early for acceptance include David Blevins, Jonathan Gallimore, Mohammed Taman, Rafael Benevides and Antoine Sabot-Durand. They will be talking about Java EE Connectors (JCA), Java EE 7 real world adoption, CDI and DeltaSpike. I would encourage you to check out all the early selections in the catalog. We are working to finalize the full catalog shortly.

I hope to see you at JavaOne. Do stay tuned for more interviews with committee members and some key speakers on our track.

Wednesday Jun 10, 2015

Meet the JavaOne Java EE Track Committee: David Heffelfinger

This is the second in a series of interviews for you to meet some of the committee members for the JavaOne 2015 Java EE track. The committee plays the most important part in determining the content for JavaOne. These good folks really deserve recognition as most of them devote many hours of their time helping move JavaOne forward, often as volunteers. If JavaOne matters to you, these are folks you should know about.

This interview is with David Heffelfinger. If you are having trouble seeing the embedded video below it is available here.

David is an independent consultant in the Washington DC metro area. He is a long time Java EE advocate, blogger, prolific author and speaker. We are proud to have him as a brand new addition to the committee this year. In the interview he shares his experience and expectations for the Java EE track this year.

On this note, I would like to make sure you know that the JavaOne content catalog is now already live with a few preliminary fairly obvious selections we were able to make. None of the sessions accepted at this stage are from Oracle speakers on our track. The folks that we selected early for acceptance include David Blevins, Jonathan Gallimore, Mohammed Taman, Rafael Benevides and Antoine Sabot-Durand. They will be talking about Java EE Connectors (JCA), Java EE 7 real world adoption, CDI and DeltaSpike. I would encourage you to check out all the early selections in the catalog. We are working to finalize the full catalog shortly.

I hope to see you at JavaOne. Do stay tuned for more interviews with committee members as well as some key speakers on our track.

Tuesday Jun 09, 2015

JSR 359: SIP Servlet 2.0

The reach of the Java EE Platform is not necessarily limited to 'traditional' Enterprise Applications. A good illustration of that is the SIP Servlet technology, which brings together the SIP programming model and the Java EE platform. SIP (Session Initiation Protocol) is a network signaling protocol, often used in the Telecommunication space, for creating and terminating sessions (e.g. VOIP sessions) with different participant(s).

A SIP Servlet is to SIP what a (traditional) Servlet is to HTTP, a server-side component managed by a container. A component developed using a Java API that interacts with clients by responding to incoming requests and returning corresponding responses. The SIP Servlet API (javax.servlet.sip) builds on the generic servlet API (javax.servlet) in much the same way as the HTTP Servlet API (javax.servlet.http) does. Given that, it is relatively easy to learn how to write SIP-based applications. A Converged Application is a (Telco oriented) application that spans multiple protocols (e.g. SIP, HTTP) and interfaces, such as Web, telephony, and other Java EE interfaces. A SIP container enables the development of applications that use SIP, HTTP Servlet API, and other Java EE APIs and components like JPA, JAX-RS, and messaging.

And like any major Java APIs, the SIP Servlet API is defined through the JCP.  The SIP Servlet specification has recently been updated, see JSR 359 here. To learn more about this, you might want to read the SIP Servlet Tutorial.

Friday Jun 05, 2015

Java EE 8 Roadmap Update

Java EE 8 was formally launched in September 2014 with the JCP’s unanimous approval of JSR 366 and our announcements at JavaOne.  At JavaOne 2014 we presented a summary of our areas of investigation for Java EE 8 during the Strategy Keynote, followed by numerous in-depth presentations on our intended work by the specification leads.  The goal that we set for ourselves then was to complete this work by JavaOne San Francisco 2016.

Although we all like to do (and hear) big things at JavaOne, the various latencies involved in launching expert groups as well as the other demands on the time of our spec leads has resulted in the date being pushed out a bit. We are strongly committed to transparency in our work on the Java EE Platform.  We are therefore publicly announcing that we are now changing our target time frame for the completion of this work to the first half of 2017.  We will be updating the target dates for the JSRs under the Java EE umbrella to reflect this change.

As a result of this shift, there is now more time and opportunity for YOU to get involved.  For example, the MVC  1.0 JSR has published their Early Draft Review, and the Java EE Security JSR will soon follow. We continue to encourage developers to track JSRs and provide feedback by viewing the individual JSR mailing lists, wikis, and download and try out early Java EE 8 reference implementation builds.  We've already seen a lot of interest not only in Java EE 8 features, but also in participation.  Many JUGs have been involved in adopting Java EE 8 and related JSRs, including the CJUGMorocco JUG, and a host of others.  Companies and individuals can get involved as well. For example, Serli, with a host of expertise in Java development, have contributed Application Versioning to GlassFish in the past, and are now signing up to contribute to the MVC reference implementation.

Start here and help define the future of Java EE! 

Friday May 29, 2015

Meet the JavaOne Java EE Track Committee: Markus Eisele

This is the first in a series of interviews for you to meet some of the committee members for the JavaOne 2015 Java EE track. The committee plays the most important part in determining the content for JavaOne. These good folks really deserve recognition as most of them devote many hours of their time helping move JavaOne forward, often as volunteers. If JavaOne matters to you, these are folks you should know about.

This first interview is with Markus Eisele. If you are having trouble seeing the embedded video below it is available here.

Markus is now a Developer Advocate at Red Hat and focuses on JBoss Middleware. He has been a long time community advocate for Java EE. He is a popular blogger, author, prolific speaker, JCP expert, Oracle recognized Java Champion and former Oracle ACE Director. He founded a successful German conference himself and helps organize a number of conferences worldwide. He has contributed as a JavaOne content committee member for a number of years. In the interview he shares his expectations for the Java EE track this year.

On this note, I would like to make sure you know that the JavaOne content catalog is now already live with a few preliminary fairly obvious selections we were able to make. None of the sessions accepted at this stage are from Oracle speakers on our track. The folks that we selected early for acceptance include David Blevins, Jonathan Gillmore, Mohammed Taman, Rafael Benevides and Antoine Sabot-Durand. They will be talking about Java EE Connectors (JCA), Java EE 7 real world adoption, CDI and DeltaSpike. I would encourage you to check out all the early selections in the catalog. I also want to remind you that you can still save money by registering early for JavaOne.

I hope to see you at JavaOne. Do stay tuned for more interviews with committee members as well as some key speakers on our track.  

Thursday May 28, 2015

AngularJS + CDI = AngularBeans

Even in the highly volatile world of JavaScript frameworks, AngularJS is still very clearly leading the pack. The good news for Java EE developers is that Java EE generally and Java EE 7 in particular works extremely well as a back-end for frameworks like AngularJS. To see why this is you need not look much farther than my talk on the topic and the corresponding example code (the code is deliberately self-contained with setup instructions so that you can explore it in detail on your own).

One of the drawbacks of the JavaScript rich client approach is that it often involves some boilerplate code that does not exist in server-side web frameworks due to the remote communication layer involved. To borrow concepts from the old J2EE design patterns, this boilerplate involves the creation and maintenance of DTOs (Data Transfer Objects) and remote proxies, not to mention the plumbing code necessary for the remote communication.  If you look carefully at my code example the boilerplate is not that hard to spot. One way of avoiding this boilerplate is a tight binding layer with the underlying back-end technology that automatically generates the DTO, remote proxy and remote plumbing parts. In the process the binding layer can bring a lot of back-end features forward to the client as well.

Fortunately for the Java EE ecosystem, my good friend Bessem Hmidi has formulated just such a solution focusing on CDI as the back-end component model. He has aptly named his project AngularBeans and first release is now on GitHub for everyone to use. His simple hello world example speaks volumes as to the power of this solution. Beyond simply removing boilerplate AngularBeans does far more (look at the GitHub page for full details):

  • Bean Validation on the client side
  • Built-in internationalization support from server-side property files
  • SockJS support
  • Server-side event binding

He has a more comprehensive example that demonstrates all the capabilities of AngularBeans. The project is at a very early stage, so this is a great time to get involved! In particular Bessem is looking to improve the project documentation.

On a slightly separate note, Bessem is the JUG leader of the ESPRIT JUG in Tunisia. He is one of the key Java EE advocates in North Africa, along with the likes of Egypt JUG leader Mohamed Taman. Bessem and I both very recently spoke at the inaugural Voxxed Days Algiers, Algeria (expect the trip report from that great event soon!).