Wednesday Dec 10, 2014

Adopt-a-JSR for Java EE 8 Spinning Up

As some of you may be aware, Adopt-a-JSR was a very innovative JUG-led program that was initiated during the later parts of the Java EE 7 time-frame. The goal of the program is to make it as easy as possible for rank-and-file Java developers to contribute to the JCP through their local Java User Groups. By all accounts the program was successful as to a good number of JUGs adopting Java EE 7 JSRs. However we should aim a lot higher for Java EE 8 and Adopt-a-JSR. There is no reason not to hope that every major JUG worldwide should adopt at least one Java EE 8 JSR. Indeed although it is still very early a number of JUGs have already committed to helping with defining the next major revision of the platform including the London Java Community, Egypt JUG, Morocco JUG, the Japan Java User Group, Java Hellenic User Group and many others.

The Java EE/GlassFish team, JCP folks like Heather VanCura and the JUG community itself is trying to do as much as we all can to ensure the success for Adopt-a-JSR for Java EE 8:

  • We put together a page dedicated to Adopt-a-JSR for Java EE on glassfish.org. This page should be your first stop if contributing to Java EE 8 JSRs via the program interests you. We will make a point to keep the page up-to-date throughout the life-cycle of Java EE 8.
  • Heather, spec lead Ed Burns, JUG leader Mohamed Taman and I presented a talk on Adopt-a-JSR for Java EE at JavaOne 2014. Heather covered the Adopt-a-JSR program at a high level, Ed talked about the program from the perspective of a spec lead while Mohamed covered the adopter perspective. I finished by talking about Adopt-a-JSR in the specific context of Java EE 8. Video of the talk should be available soon and we will highlight it here as soon as we can.
  • Both I and Patrick Curran highlighted the program during our keynotes at JMaghreb and Java2Days (stay tuned for trip reports).
  • Heather has been and will continue to organize meetings (especially with spec leads) to keep promoting Adopt-a-JSR. Most recently Heather hosted an open meeting with Java EE 8 platform spec lead Linda DeMichiel. Heather blogged about the meetings here and posted the slides. The next meeting will be on December 19th at 10 AM Pacific time with Ed Burns and Manfred Riem, so stay tuned (details on how to join the meetings are on Heather's post).
  • Java EE/GlassFish author, speaker and advocate Josh Juneau is leading a meeting on Adopt-a-JSR for his local Chicago JUG in January.

You can help us too by spreading the word on Adopt-a-JSR to your local JUG. If you are interested, never hesitate to reach out as always.

Tuesday Dec 09, 2014

JavaOne 2014: A Small Step in the Right Direction?

JavaOne 2014 San Francisco was held September 28 – October 2. I think this was a particularly good year for JavaOne in many ways and it's certainly been a privilege to try to do justice to the crucial role of Java EE track lead (a role I took on for the first time this year). I'd like to share my thoughts, observations and experiences at JavaOne 2014 from that perspective. We did a few things differently this year that seemed to have paid off fairly well.

Besides helping organize the conference, I pitched in the keynote demo, scouted as many Java EE sessions as I could in my track and led a few sessions. More details on all of this, including thoughts, analysis, slide decks and code, is posted on my personal blog.

Thursday Dec 04, 2014

The Java 7 EE Tutorial - free eBook!

The Java EE 7 Documentation page has been recently refreshed with an improved and cleaner layout.   It should now be easier to locate, browse and read the Java EE API documentation, the Java EE SDK documentation and the Java EE Tutorials.

It is sometime useful to remind about the availability of useful resources such the "Java EE Tutorial"… even more when those resources a free!  The Java EE Tutorial is one of those gems that is sometime overlooked.  It covers Java EE 7 and is an invaluable set of resources for anyone wanting to learn Java EE but also for people already familiar with Java EE as it also covers some of the less known part of the Java EE platform such as JCA.

For new comers, there is "Your First Cup: An Introduction to the Java EE Platform", a crisp introduction to the Java EE platform.

The "Java EE 7 Tutorial" is available for free (online and PDF format).  In addition, the Java EE Tutorial is now also available in ePub and Mobi formats (hint: check the top right corner) so you can download and read it on your preferred eBook reader (tablets, iBook, Kindle, etc.).  Just check the top right corner.  And again, those great resources are free!

Finally if you are more old school, the "Java EE 7 Tutorial" is also available, for a fee, as a dead-tree version.

Tuesday Dec 02, 2014

JMS 2.0 Errata release

There is a clear plan to enhance the JMS specification and that is JMS 2.1 (JSR 368), slated for inclusion in Java EE 8.  The JMS 2.1 Expert Group is still in formation phase and once this is done, the EG will start the actual works on the next revision of JMS.  This work is expected to take time, Q3 2016 is the current ETA for the Java EE 8 final release. 

But let's not forget the current version of JMS, i.e. JMS 2.0 (JSR 343).  An errata is needed to correct a few errors in JMS 2.0 which can't wait for JMS 2.1 because they affect the ability of implementers to correctly implement JMS 2.0 today.  An 'errata' is a simple kind of maintenance release intended purely to correct errors in the specification, so clearly the intention is not define any new features (any new features should be discussed within the JMS 2.1 scope).

For that reason, Nigel Deakin (JMS 2.0 and JMS 2.1 Specification Lead) has proposed and started an errata for JMS 2.0.  An Errata release (and maintenance releases in general) don’t have an Expert Group.  Nevertheless Nigel is soliciting feedback on the various small issues that he plans to have addressed in the JMS 2.0 Errata.  You can check the changes proposed for the JMS 2.0 errata on this Wiki page, the jms-spec users mailing list is a good channel to provide feedback.

Monday Dec 01, 2014

Bulk Update/Delete using the Criteria API in JPA 2.1/Java EE 7

It has long been possible to do bulk updates and deletes using JPQL in JPA. Since JPQL is closely modeled after SQL, it has the key advantages that SQL does - namely that it is a very compact and powerful DSL for relational data manipulation. JPQL is also a natural transition mechanism to JPA for folks that have worked with SQL for a while (such as myself).

The big drawback for JPQL is that it is decoupled from the Java compiler and thus less type-safe/more error-prone. This weakness becomes particularly salient while needing to dynamically construct queries at runtime (with JPQL this basically turns into a lot of hard-to-read string manipulation) or with folks coming from a Java/OO background without much preexisting experience with SQL/RDBMS. For these reasons, the type-safe, Java centric Criteria Query API was added to JPA 2.0/Java EE 6.

In JPA 2.1/Java EE 7 the Criteria API has been moved even closer to JPQL with the addition of bulk update and delete capabilities (the Criteria API in JPA 2.0 supported queries which is by far still the primary use case for the API). Hantsy Bai has a very nice post demonstrating how bulk updates/deletes look like using the JPA 2.1 Criteria API.

For a more basic overview of the Criteria API itself, you should check out the official Java EE 7 tutorial.

Thursday Nov 27, 2014

JSR 375: Java EE Security API

Java EE has been used to develop and run enterprise applications securely since years.  Obviously, Java EE and its containers are just parts of the global security equation. When we zoom at the Java EE layer, we see that some of the security capabilities are backed into the specification while others security features are proprietary and specific to the different Java EE implementations.  Sometime, some of the security capabilities are also external add-on's (e.g. 3rd party libraries).  Security is not a self-contained matter as interactions between different components are often required (e.g. a Java EE Application Server needs to interact with an LDAP server).  Things also change when we go from an on-premises deployment to a cloud based deployment.  Finally, portability is never simple when it comes to security.

Java EE needs to evolve to stay relevant and clearly, if we look at the feedback from the Java EE 8 Community Survey, security is an area that could be improved.  And that is the goal of JSR 375 (Java EE Security API) which has just been submitted to the JCP for review.  JSR 375 is slated for inclusion in Java EE 8, its initial scope is based on the community survey feedback, on issues and RFEs filled against the Java EE specifications, on various exchanges EG members had overtime and also on various informal discussions we had during conferences, etc.

The JSR proposal gives a more detailed overview of what it will try to achieve.  In short, JSR 375’s goal is to simplify, standardize, and modernize the Security API across the platform in different area.

  • User Management: Standardization of a ’user service’ API which would enable an application to perform user management operations (e.g. create a user). The ‘user service’ would rely on a ‘user source’ which would be an abstraction of a physical user store (e.g. LDAP, data-bases, etc.).  The user service would be configurable to match the deployment requirements.
  • Password Aliasing: Standardization of syntax for pointing (alias) to passwords stored in a (secure) password repository.  This password repository might then be bundled with an application (e.g. think cloud deployment).
  • Role Mapping: Definition and standardization of a ‘role service’ API that would enable an application to perform various role mapping operations (e.g. querying a group role).  This would be done via different role mappers (e.g. LDAP, files) that would be adaptable based on the environment’s needs.
  • Authorization: Definition of a new CDI interceptor annotation that would be used to preform application-domain rules at the method level.
  • Authentication: Several enhancements are also planned around authentication (e.g. the ability for a web application to offers different authentication methods).

This is the just of overview of the initial scope. In addition, the Experts Group will also have to look at how some of the Java EE orthogonal technologies (e.g. CDI events, Expression Language, etc.) can be leveraged in order to simplify the use of those new APIs.  To know more about this JSR, make sure to read the JSR 375 proposal. You can also watch the replay of the "Java EE 8 Overview" that Linda DeMichiel gave during JavaOne as she has touched some of those ideas during her talk.

JSR 375 has entered the JCP review period; the next step should then be the approval ballot period. And if it passes this ballot, the Experts Group will be formed and the real works (and discussions) will start!   So we are just at the beginning of this effort but it’s nice to see the different pieces of Java EE 8 being put in place...

Wednesday Nov 26, 2014

JMS2 + JCP @ Chicago JUG

On September 4th, I spoke at the Chicago Java User Group on both JMS 2 as well as the basics of the JCP program. Spearheaded by the very capable likes of Freddy Guime and Bob Paulin the Chicago JUG has grown to become one of the most important Java User Groups in the world - both in terms of size, importance and impact. I am proud to say this is my second time to the JUG - a few months ago they had me speak on Java EE 7. My visit this time was very generously sponsored by Jay Zimmerman of the No Fluff Just Stuff (NFJS) tour. NFJS has always made an effort to support Java User Groups around the US.

I started the evening out with my JMS 2 talk (slides below). I also covered some of the possibilities for JMS 2.1.

I spent the last half-hour or so giving a very high level overview of the JCP program. I essentially borrowed Heather VanCura's slides (my own slides on the topic are rather old and developed when I was still an independent). Heather's slides can be found on SlideShare. The Chicago JUG has a very active interest in contributing to the JCP, which is why they had me speak on the topic. In fact with some help from US based Java EE/GlassFish advocate Josh Juneau they will soon be adopting one or more of the Java EE 8 JSRs via Adopt-a-JSR. The Java EE community is very lucky to have Josh's presence in the greater Chicago area. Josh is already an incredibly prolific author and blogger - it is awesome to see him become more prominent as a speaker as well including at JavaOne 2015 (and of course at his own local Chicago JUG).

It was great to be at the Chicago JUG and I hope to return sooner rather than later to the Windy City!

Thursday Nov 20, 2014

Tools for MVC in Java EE 8

Last week at Devoxx, Manfred Riem (MVC 1.0 Co-Specification Lead) did a session on MVC 1.0 (JSR 371) to a packed room. During the session, Geertjan Wielenga (Principal Product Manager in the Oracle Developer Tools) did a cameo appearance to discuss the tooling in the context of MVC. Amongst other things, Geertjan is looking at some of the potential features an IDE could bring to simplify the development of MVC based applications.  During the session, Geertjan did a demo based on a prototype he wrote for NetBeans. This demo was also using Manfred’s experimental action based prototype.

So clearly, it's early days! After all the MVC Experts Group has just started and is now discussing important orientations for the specification (e.g Should the Controller be based on the Servlet API or should it be layered on top of JAX-RS?). Nevertheless, it is interesting to follow Geertjan's explorations around tooling in that space.  This also demonstrates that adding new features to NetBeans is not necessarily a daunting task!

You can find more details on Geertjan's blog: Tools for MVC in Java EE 8 - Part 1 and Part 2.

Tuesday Nov 18, 2014

JavaOne Replay: "Into the Wild with Servlet Async IO"

Greg Wilkins has an impressive 'Web pedigree’; he is the founder and lead developer of Jetty.  Greg is a long-time member of the Servlet Expert Group; he is also a member of the IETF HTTP/2 working group member, etc.!

During his JavaOne session, Greg gave a deep technical overview on Asynchronous IO using the Servlet API.  Greg starts by explaining what asynchronous means in the context of a Servlet. He then goes and explains the Servlet 3.0 asynchronicity support.  The rest of the talk is then spent on the Servlet 3.1 API and how to write effective asynchronous servlets (and how the inner-working of the API).  Greg also shares some of the motivations behind the Servlet 3.1 API and the technical choices behind it. Not only that, Greg is also talking about some 'potential more obvious technical options' and why those options were not selected at the end.

This technical session provides different angles (e.g. Servlet API explanations, some deep technical points such as some of the Jetty implementation details but also best practices advices, etc.).  Overall this session is highly recommended for anyone who want to understand asynchronicity in the context of the Servlet API.


You can find Greg's slides here.

Wednesday Nov 12, 2014

Java EE @ NFJS Pacific Northwest Software Symposium Seattle

As some of you may be aware I recently joined the well-respected US based No Fluff Just Stuff (NFJS) Tour. The NFJS Pacific Northwest Software Symposium was held October 17 - 19 in Seattle, Washington.

I had five talks total over two days, more or less back-to-back. I did talks on Java EE 7/Java EE 8, the Cargo Tracker Java EE Blue Prints, JavaScript + Java EE, Java EE + NoSQL as well as WebSocket. More details, including slide decks and code as well as my NFJS tour schedule, posted on my personal blog.

Monday Nov 10, 2014

JavaOne Replay: eBay and JavaServer Faces

During JavaOne, Sushma Sharma and Ken Paulsen of eBay did a session on Gandalf: 'eBay, Connecting Buyers and Sellers Globally via JavaServer Faces'.

Gandalf is a 'Quick Listing tool'. Gandalf is JSF based tool that let non professional eBay users list their items in order to sell them. Since Gandalf targets non professional users, the tool and the its user interface has to be intuitive and simple. And as mentioned in during the session, that type of users represent the largest population of amongst the eBay sellers. Gandalf an application that is very demanding in terms or features and requirements. Security is obviously a top requirement but accessibility, responsiveness, ... are also very important.

And last but not least, Gandalf is widely used. On a typical day, Gandalf is used by around 200,000 sellers who are adding around 800,000 new listings (again, this is per day!). And that number can grow up to 2.5 millions listings on a peak day! So Gandalf is not really a typical enterprise application, it is more a large scale end-user facing web application.

During their session, Sushma and Ken have discussed JSF, how JSF can scale, ... they have also shared a few JSF tips. Despite the small technical issues (e.g. a few audio hiccups), this J1 session replay is particularly interesting as it clearly kills the 'JSF doesn't scale' myth as this session clearly demonstrate that well designed JSF applications can cope with very demanding requirements.

Thursday Nov 06, 2014

JavaOne Replay: JAX-RS.next

JAX-RS is a key technology of the Java EE platform as REST endpoints are more and more used. Marek Potočiar (JAX-RS Co-Specification Lead) did a session during JavaOne to detail some of the proposed JAX-RS enhancements and extensions that should be part of Java EE 8. These proposals include better support for JSON (JSON-B), improved alignment between JAX-RS and CDI, enhanced support for hypermedia as well as declarative security, server-sent events, and MVC integration. 

Jersey is the open source JAX-RS Reference Implementation but Jersey doesn't limit itself to the specification, i.e. Jersey has also has additional specific features. In some cases, some of the Jersey proprietary features have been standardised and added to the specification (eg. the Client API have been added to JAX-RS 2.0). So it is always interesting to check the Jersey specific extensions as some of those might be potential candidates for inclusion into a future revision of the JAX-RS specification. For example, SSE is currently supported in a Jersey specific manner but the plan is to standardised SSE support in JAX-RS 2.1. So make sure to also watch this 'What's New and Noteworthy in Jersey 2' replay that was presented by Jakub Podlešák and Miroslav Fuksa during JavaOne 2014.

You can get the 'Let’s Talk JAX-RS.next!' slides here.

Wednesday Nov 05, 2014

OTN Virtual Technology Summit

The OTN Virtual Technology Summit is a set of free online events covering various technical topics such as Java SE, Java EE but also Middleware, Database, etc.  Each topic will be presented by a subject matter expert coming either from Oracle or from the community (Java Champions, Oracle ACEs, ...). And during each session, a live chat will let participants ask questions and clarifications on the presented subject. You can check the agenda of the different tracks here.

OTN Virtual Technology Summit is a free event so make sure to register for this month OTN VTS!

  • VTS America : November 18th, 2014 – 9am to 12:30pm PST, register here.
  • VTA Asia : November 19th, 2014 – 10:00am to 1:30pm IST, register here.
  • VTS Europe : November 26th, 2014 – 9am to 12:30pm GMT, register here.

Tuesday Nov 04, 2014

Java EE 8 at Devoxx

Next week (Nov. 10-14), 3.500 Devoxxians from 40 different countries will come to sunny Antwerp to attend the 13th edition of Devoxx (Belgium). Devoxx covers a broad range of topics ranging from Java SE, Mobile and Web Development, Embedded... to Java on the Server. This year Server-side Java track has very good contents including a good Java EE 8 coverage. Also, this year, you have the possibility to ask, in advance, questions to any of the speaker. For that, just check a session page and click on 'Send a question to the speaker'.

You can check the full Devoxx agenda here but here are the sessions that will discuss Java EE 8.

And this is just for Java EE 8! Here are some other Java EE related sessions that are worth to mentions too.

Again, this is just an overview, make sure to check full agenda here.

Also, we are still working on the details but do expect some Java EE 8 coverage during the Devoxx Hackergarten.

Will I see you next week at Devoxx?

Monday Nov 03, 2014

Java EE @ NFJS New England Software Symposium Boston

As some of you may be aware I recently joined the well-respected US based No Fluff Just Stuff (NFJS) Tour. The NFJS New England Software Symposium was held September 19 - 21 in Boston. This is one of the larger NFJS shows and attendance at the show and my sessions was pretty good. It is always encouraging to see the same folks attend more than one talk. On my way to the show I also stopped by at the Connecticut Java User Group. The JUG is led by my friend and co-author for EJB 3 in Action Ryan Cuprak. I've spoken at the JUG a number of times over the years and it was good to be back.

I had five talks total over two days, more or less back-to-back. I did talks on Java EE 7/Java EE 8, the Cargo Tracker Java EE Blue Prints, JavaScript + Java EE, Java EE + NoSQL as well as JMS 2. More details, including slide decks and code as well as my NFJS tour schedule, posted on my personal blog.