Oracle Blog

Reza Rahman's Java EE/GlassFish Blog

Thursday Oct 17, 2013

I have been working with the JCP in various roles since EJB 3/Java EE 5 (much of it on my own time), eventually culminating in my decision to accept my current role at Oracle (despite it's inevitable set of unique challenges, a role I find by and large positive and fulfilling). During these years, it has always been clear to me that pretty much everyone in the JCP genuinely cares about openness, feedback and developer participation. Perhaps the most visible sign to date of this high regard for grassroots level input is a survey on Java EE 7 gathered a few months ago. The survey was designed to get open feedback on a number of critical issues central to the Java EE 7 umbrella specification including what APIs to include in the standard. When we started the survey, I don't think anyone was certain what the level of participation from developers would really be. I also think everyone was pleasantly surprised that a large number of developers (around 1100) took the time out to vote on these very important issues that could impact their own professional life. And it wasn't just a matter of the quantity of responses. I was particularly impressed with the quality of the comments made through the survey (some of which I'll try to do justice to below).

With Java EE 7 under our belt and the horizons for Java EE 8 emerging, this is a good time to thank everyone that took the survey once again for their thoughts and let you know what the impact of your voice actually was. As an aside, you may be happy to know that we are working hard behind the scenes to try to put together a similar survey to help kick off the agenda for Java EE 8 (although this is by no means certain). I'll break things down by the questions asked in the survey, the responses and the resulting change in the specification.

APIs to Add to Java EE 7 Full/Web Profile

The first question in the survey asked which of four new candidate APIs (WebSocket, JSON-P, JBatch and JCache) should be added to the Java EE 7 Full and Web profile respectively.

Developers by and large wanted all the new APIs added to the full platform. The comments expressed particularly strong support for WebSocket and JCache. Others expressed dissatisfaction over the lack of a JSON binding (as opposed to JSON processing) API.

WebSocket, JSON-P and JBatch are now part of Java EE 7. In addition, the long-awaited Java EE Concurrency Utilities API was also included in the Full Profile. Unfortunately, JCache was not finalized in time for Java EE 7 and the decision was made not to hold up the Java EE release any longer. JCache continues to move forward strongly and will very likely be included in Java EE 8 (it will be available much sooner than Java EE 8 to boot). An emergent standard for JSON-B is also a strong possibility for Java EE 8.

When it came to the Web Profile, developers were supportive of adding WebSocket and JSON-P, but not JBatch and JCache. Both WebSocket and JSON-P are now part of the Web Profile, now also including the already popular JAX-RS API.

Enabling CDI by Default

The second question asked whether CDI should be enabled in Java EE by default.

The overwhelming majority of developers supported the default enablement of CDI. In addition, developers expressed a desire for better CDI/Java EE alignment (with regards to EJB and JSF in particular). Some developers expressed legitimate concerns over the performance implications of enabling CDI globally as well as the potential conflict with other JSR 330 implementations like Spring and Guice.

CDI is enabled by default in Java EE 7. Respecting the legitimate concerns, CDI 1.1 was very careful to add additional controls around component scanning. While a lot of work was done in Java EE 6 and Java EE 7 around CDI alignment, further alignment is under serious consideration for Java EE 8.

Consistent Usage of @Inject

The third question was around using CDI/JSR 330 @Inject consistently vs. allowing JSRs to create their own injection annotations (e.g. @BatchContext).

A majority of developers wanted consistent usage of @Inject. The comments again reflected a strong desire for CDI/Java EE alignment.

A lot of emphasis in Java EE 7 was put into using @Inject consistently. For example, the JBatch specification is focused on using @Inject wherever possible. JAX-RS remains an exception with it's existing custom injection annotations. However, the JAX-RS specification leads understand the importance of eventual convergence, hopefully in Java EE 8.

Expanding the Use of @Stereotype

The fourth question was about expanding CDI @Stereotype to cover annotations across Java EE beyond just CDI.

A solid majority of developers supported the idea of making @Stereotype more universal in Java EE. The comments maintained the general theme of strong support for CDI/Java EE alignment

Unfortunately, there was not enough time and resources in Java EE 7 to implement this fairly pervasive feature. However, it remains a serious consideration for Java EE 8.

Expanding Interceptor Use

The final set of questions was about expanding interceptors further across Java EE.

Developers strongly supported the concept. Along with injection, interceptors are now supported across all Java EE 7 components including Servlets, Filters, Listeners, JAX-WS endpoints, JAX-RS resources, WebSocket endpoints and so on.

I hope you are encouraged by how your input to the survey helped shape Java EE 7 and continues to shape Java EE 8. Participating in these sorts of surveys is of course just one way of contributing to Java EE. Another great way to stay involved is the Adopt-A-JSR Program. A large number of developers are already participating through their local JUGs. You could of course become a Java EE JSR expert group member or observer. You should stay tuned to The Aquarium for the progress of Java EE 8 JSRs if that's something you want to look into...

Wednesday Oct 02, 2013

JavaOne 2013 San Francisco was held September 22-26. I am proud to say this is my seventh JavaOne as an attendee, my fifth one as a speaker, my second one as an Oracle employee and my first one as a member of the content committee. This was a particularly important year from a Java EE standpoint with the release of EE 7 and GlassFish 4 - the content reflected this fact.

I'll admit JavaOne has a special place in my heart - I still remember how awe inspiring my first JavaOne was. It seemed almost surreal, as if the air itself was electrifying. For almost a full week, I felt proud and humbled to be part of an incredible global phenomenon taking place under the roof of Moscone Center in beautiful San Francisco. It made me want to be a more significant part of the Java community. While JavaOne 2013 can certainly be considered a success by most measures, I think most folks would say the atmosphere for JavaOne 2013 unfortunately would not resemble the description of my first JavaOne. Whatever the underlying factors, that's a real shame since there can be little question that JavaOne remains the most important Java conference in the world. Having taken part in organizing a few other fairly large conferences and attending/speaking at numerous others, the content was definitely of outstanding quality even as compared with many other conferences of similar magnitude. It's clear the best and the brightest in the Java ecosystem still see participating in JavaOne as a badge of honor and a privilege. Perhaps a wise retrospective to be had is that we at Oracle need to do more to keep the conference a uniquely valuable experience and try to reach out to a newer generation of developers that would continue to find JavaOne inspiring. On the other hand, hopefully it's just that I'm a bit more jaded and less naive than I once used to be :-).

At any rate, JavaOne 2013 was definitely both hectic and rewarding personally. Besides booth duty at the GlassFish 4/Java EE 7 kiosk, I had one user group event, a couple of BOFs and a technical session. The conference really started for me on Saturday evening with making sure the GlassFish 4/Java EE 7 kiosk is up and running. I am proud to say Cargo Tracker was demoed at the booth along with the Java EE 7 Hands-on-Lab. Part of the Java EE Blue Prints project, Cargo Tracker is a sub-project I initiated that is aimed at demonstrating architectural best practices such as Domain-Driven Design (DDD) using Java EE 7. It's essentially the well known Java DDD sample application originally written in Spring, Hibernate and Jetty modernized, expanded and ported over to Java EE 7/GlassFish 4. If you weren't aware of the project, it is somewhat deliberate. We are still working out some details before we do our first alpha release and reach out to the community. Consider this a sneak peek :-). You are of course welcome to contribute to the open source project any time.

It was my pleasure and privilege to lead the GlassFish Community Event on Sunday. It's long been a rallying point for the GlassFish and Java EE communities at JavaOne and a great way to kick off the conference. Despite the early morning timing and somewhat unfortunate but unavoidable conflict with the NetBeans Sunday User Group event, the two hour session was fairly well attended as usual. John did an excellent job presenting the road map as usual (slide deck embedded below), the GlassFish/Oracle executive panel was very good and we had four great Java EE/GlassFish stories this year. The entire session was video recorded and all the slide decks are posted on SlideShare. We still need to figure out how we can best get all the great content to the broader community, but I hope we can publish most of it on the GlassFish.org page for the event. The stories will be posted on the usual blog that hosts all Java EE/GlassFish stories.

The now iconic GlassFish party was held at the Thirsty Bear in the evening. The party was a full house with a ton of pictures that we will publish soon as well.

On Monday and Tuesday afternoon, I had booth duty. The booth traffic was decent and there were a number of pretty good conversations. On Monday afternoon I had my first BOF titled "What’s New with Bean Validation and Expression Language in Java EE 7". I generally enjoy BOFs as they give me an opportunity to talk about a given topic at a slightly deeper level in a slightly less impersonal setting. The goal was to have a fairly informal/open-ended discussion around the changes in Bean Validation 1.1 as well as EL 3 and the impact of these changes in terms of the Java EE 7 platform as well as the broader ecosystem. Somewhat to my surprise, the BOF was packed and I got excellent feedback afterwards. I decided to break up the BOF deck into two separate lightning talk oriented decks (posted below). As always, I've posted the source PPT so you are welcome to use the material yourself as you see fit.

On Tuesday evening I led the GlassFish BOF. Tuesday late evening is always a tough time slot since many of the parties are scheduled at the time. Nonetheless, we had pretty good attendance and some excellent conversations. We covered Java EE 7, the features in GlassFish 4 beyond Java EE, the GlassFish/Java EE ecosystem, the GlassFish.org face lift, project Avatar and the road ahead. The slide deck is posted below.

On Thursday mid-day I had my technical session titled "Android and iOS Development with Java EE 7". I co-presented the talk with Ryan Cuprak and Bala Muthuvarathan. Ryan is the leader of the Connecticut JUG, a close friend and my co-author on the upcoming second edition of EJB 3 in Action (covering EJB 3.1, CDI 1.1, JPA 2.1, etc). Bala is a friend and former colleague from CapTech Consulting. They are both incredibly capable people that it is an honor to work with. The goal of the talk was to demonstrate how Java EE 7 can be used as an effective back-end for native mobile development with Android and iOS. The server-side consists of a chat WebSocket API and a to do list REST API implemented using the Java API for WebSocket, JSON-P, JAX-RS 2, CDI, Bean Validation, EJB 3 and JPA. While I focused on the server-side code, Ryan wrote the iOS portion while Bala wrote the Android portion. The demo code is available on GitHub and the slide deck is posted below. The idea is to give you the seed code you need to get started with Java EE 7 based mobile development. The plan is for me, Ryan and Bala to co-author an article series on the material very soon.

The talk went extremely well and was a full house. A couple of folks went so far as to tell us that it was "one of the best talks of the conference" and "the only talk worth attending all week". As an offshoot to the talk, I entered a couple of feature requests against Tyrus and Jersey. Feel free to vote on the issues and contribute to the project on GitHub. Also, do drop me a note if you need help getting things up and running.

The Saturday after the conference my wife Nicole and I took my daughter Zehra to see the Kings Canyon and Sequoia National Parks. Home to giant sequoias like General Sherman, the parks offer some of the most spectacular landscapes that still represents the uniqueness, magnificence and great potential of this country. At 275 feet tall and approximately 2500 years old, General Sherman is the largest known living single stem tree on Earth. If the presence of the giant sequoias doesn't inspire you to try to live a meaningful life beyond yourself that makes a positive difference for as many people as you can in your fleeting and insignificant lifetime, nothing probably ever will...

All in all, this JavaOne trip was good overall and I hope to be a part of JavaOne again next year.